Translations. Motif Programmer s Reference 1

Similar documents
Advanced Motif Window Manager Customization

HDS Local Terminal Emulation Clients

Formulas and Functions

flex is not a bad tool to use for doing modest text transformations and for programs that collect statistics on input.

OpenGL Drawing Widgets and Related Functions

Section 5.5: Text Menu Input from Character Strings

(Refer Slide Time: 01:12)

Programming Languages Third Edition

SPEECH RECOGNITION COMMON COMMANDS

Introducing Motif. Motif User s Guide 1

ü 1.1 Getting Started

Decaf Language Reference Manual

MODULE III: NAVIGATING AND FORMULAS

The Mathcad Workspace 7

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors.

Introduction to the workbook and spreadsheet

Xrdb - X Resource Database Operations

Using nu/tpu on UNIX Last revised: 1/28/00

Scheme Quick Reference

G47 Text Engraving (Group 00) - Mill. Troubleshooting. How it Works. Haas Technical Documentation. Setting 85 is Too High for Shallow Text Engraving

1. Introduction to Microsoft Excel

HP DECwindows Motif for OpenVMS Documentation Overview

Scheme Quick Reference

Microsoft Office Excel Use Excel s functions. Tutorial 2 Working With Formulas and Functions

ITC213: STRUCTURED PROGRAMMING. Bhaskar Shrestha National College of Computer Studies Tribhuvan University

Understanding Regular Expressions, Special Characters, and Patterns

Expr Language Reference

I OFFICE TAB... 1 RIBBONS & GROUPS... 2 OTHER SCREEN PARTS... 4 APPLICATION SPECIFICATIONS... 5 THE BASICS...

Basic Controls. Motif Programmer s Guide 1

Lesson 1: Writing Your First JavaScript

BoredGames Language Reference Manual A Language for Board Games. Brandon Kessler (bpk2107) and Kristen Wise (kew2132)

Code Editor. The Code Editor is made up of the following areas: Toolbar. Editable Area Output Panel Status Bar Outline. Toolbar

INTERNATIONAL TELECOMMUNICATION UNION

Getting Started with Command Prompts

d-file Language Reference Manual

A Fast Review of C Essentials Part I

Learning Language. Reference Manual. George Liao (gkl2104) Joseanibal Colon Ramos (jc2373) Stephen Robinson (sar2120) Huabiao Xu(hx2104)

Karlen Communications Narrator Keyboard Commands in Win 8. Karen McCall, M.Ed.

The STRIPS Subset of PDDL for the Learning Track of IPC-08

CS401 - Computer Architecture and Assembly Language Programming Glossary By

An Oz Subset. 1 Microsyntax for An Oz Subset. Notational Conventions. COP 4020 Programming Languages 1 January 17, 2012

Appendix C. Numeric and Character Entity Reference

C How to Program, 6/e by Pearson Education, Inc. All Rights Reserved.

Laboratory 1. Part 1: Introduction to Spreadsheets

New Features of Eli Version 4.3

Lexical Considerations

Developing a Basic Web Site

NEW CEIBO DEBUGGER. Menus and Commands

DEFENSE LOGISTICS AGENCY HEADQUARTERS 8725 JOHN J. KINGMAN ROAD FORT BELVOIR, VIRGINIA

GMI-Cmd.exe Reference Manual GMI Command Utility General Management Interface Foundation

GETTING STARTED AND EXITING VW

fpp: Fortran preprocessor March 9, 2009

1. Lexical Analysis Phase

WSR Commands. WSR Commands: Mouse Grid: What can I say?: Will show a list of applicable commands

Part I Logic programming paradigm

How to Use Function Keys in Mobile Applications for Handhelds

Control Structures. CIS 118 Intro to LINUX

ECE Lesson Plan - Class 1 Fall, 2001

IFA/QFN VBA Tutorial Notes prepared by Keith Wong

A A B U n i v e r s i t y

Microsoft Excel 2010 Handout

Lexical Considerations

9.2 Linux Essentials Exam Objectives

CHAD Language Reference Manual

1 Lexical Considerations

XDMCP Operations. Section Network and Host System Operations. HDS ViewStation System Administrator s Guide. 3.

CS102: Standard I/O. %<flag(s)><width><precision><size>conversion-code

lab MS Excel 2010 active cell

Volume and File Structure for Write-Once and Rewritable Media using Non-Sequential Recording for Information Interchange

NiceForm User Guide. English Edition. Rev Euro Plus d.o.o. & Niceware International LLC All rights reserved.

Chapter 1 Summary. Chapter 2 Summary. end of a string, in which case the string can span multiple lines.

FSEDIT Procedure Windows

CROSSREF Manual. Tools and Utilities Library

Principles of Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Create formulas in Excel

EGR 111 Introduction to MATLAB

Name: Dr. Fritz Wilhelm Lab 1, Presentation of lab reports Page # 1 of 7 5/17/2012 Physics 120 Section: ####

1. What type of error produces incorrect results but does not prevent the program from running? a. syntax b. logic c. grammatical d.

Client-Side Web Technologies. CSS Part I

Using the aregcmd Commands

Using the Command-Line Interface

Array Basics: Outline. Creating and Accessing Arrays. Creating and Accessing Arrays. Arrays (Savitch, Chapter 7)

HP Intelligent Management Center v7.1 MySQL 5.6 Installation and Configuration Guide (Windows)

C++ Programming: From Problem Analysis to Program Design, Third Edition

Lab1: Use of Word and Excel

13 File Structures. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

Chapter 2 Basic Elements of C++

Parsing Combinators: Introduction & Tutorial

Information technology. Specification method for cultural conventions ISO/IEC JTC1/SC22/WG20 N690. Reference number of working document:

Examples: Directory pathname: File pathname: /home/username/ics124/assignments/ /home/username/ops224/assignments/assn1.txt

Introduction to C# Applications

VHDL Lexical Elements

MS Office Word Tabs & Tables Manual. Catraining.co.uk Tel:

PROGRAMMER S AID CARTRIDGE

Objectives. Chapter 2: Basic Elements of C++ Introduction. Objectives (cont d.) A C++ Program (cont d.) A C++ Program

Chapter 2: Basic Elements of C++

I BSc(IT) [ Batch] Semester II Core: Object Oriented Programming With C plus plus - 212A Multiple Choice Questions.

Chapter 2: Basic Elements of C++ Objectives. Objectives (cont d.) A C++ Program. Introduction

Mill Mouse User Guide. Ver. 4.1 Author: topolo-z

COP 3402 Systems Software Top Down Parsing (Recursive Descent)

Transcription:

Translations VirtualBindings Motif Programmer s Reference 1

VirtualBindings (library call) NAME VirtualBindings Bindings for virtual mouse and key events DESCRIPTION The Motif reference pages describe key translations in terms of virtual bindings, based on those described in the Motif Style Guide. Bindings for osf Keysyms Keysym strings that begin with osf are not part of the X server s keyboard mapping. Instead, these keysyms are produced on the client side at run time. They are interpreted by the routine XmTranslateKey, and are used by the translation manager when the server delivers an actual key event. For each application, a mapping is maintained between osf keysyms and keysyms that correspond to actual keys. This mapping is based on information obtained at application startup from one of the following sources, listed in order of precedence: The XmNdefaultVirtualBindings resource from Display. A property on the root window, which can be set by mwm on startup, or by the xmbind client, or on prior startup of a Motif application. The file.motifbind in the user s home directory. A set of bindings based on the vendor string and optionally the vendor release of the X server. Motif searches for these bindings in the following steps: 1. If the file xmbind.alias exists in the user s home directory, Motif searches this file for a pathname associated with the vendor string or with the vendor string and vendor release. If it finds such a pathname and if that file exists, Motif loads the bindings contained in that file. 2. If it has found no bindings, Motif next looks for the file xmbind.alias in the directory specified by the environment variable XMBINDDIR, if XMBINDDIR is set, or in the directory /usr/lib/xm/bindings if XMBINDDIR is not set. If this file exists Motif searches it for a pathname associated with the vendor string or with the vendor string and vendor release. If it finds such a pathname and if that file exists, Motif loads the bindings contained in that file. 3. If it still has found no bindings, Motif loads a set of hard coded fallback bindings. The xmbind.alias file contains zero or more lines of the following form: "vendor_string [ vendor_release ]" bindings_file where vendor_string is the X server vendor name as returned by the X client xdpyinfo or the Xlib function XServerVendor, and must appear in double quotes. If vendor_release is included, it is the X server vendor release number as returned by the X client xdpyinfo or the Xlib function XVendorRelease, and must also be contained within the double quotes separated by one space from vendor_string. The vendor_release argument is provided to allow support of changes in keyboard hardware from a vendor, assuming that the vendor increments the release number to flag such changes. Alternatively, the vendor may simply use a unique vendor string for each different keyboard. The bindings_file argument is the pathname of the file containing the bindings themselves. It can be a relative or absolute pathname. If it it is a relative pathname, it is relative to the location of the xmbind.alias file. Comment lines in the xmbind.alias file begin with! (exclamation point). The bindings found in either the.motifbind file or the vendor mapping are placed in a property on the root window. This property is used to determine the bindings for subsequent Motif applications. On startup mwm attempts to load the file.motifbind in the user s home directory. If this is unsuccessful, it loads the vendor bindings as described previously. It places the bindings it loads in a property on the root window for use by subsequent Motif applications. The xmbind function loads bindings from a file if that file is specified on the command line. If no file is specified on the command line, it attempts to load the file.motifbind in the user s home directory. If this fails, it loads the vendor bindings as described previously. It places the bindings it loads in a property on the root window for use by subsequent Motif applications. The format of the specification for mapping osf keysyms to actual keysyms is similar to that of a specification for an event translation. (See below) The syntax is specified (and below) here in EBNF notation using the following conventions: [a] Means either nothing or a {a} Means zero or more occurrences of a Motif Programmer s Reference 2

(a b) Means either a or b. Terminals are enclosed in double quotation marks. The syntax of an osf keysym binding specification is as follows: binding_spec = {line "\n"} [line] line = virtual_keysym ":" list_of_key_event list_of_key_event= key_event { "," key_event} key_event = {modifier_name} "<Key>" actual_keysym virtual_keysym = keysym actual_keysym = keysym keysym = A valid X11 keysym name that is mapped by XStringToKeysym As with event translations, more specific event descriptions must precede less specific descriptions. For example, an event description for a key with a modifier must precede a description for the same key without the same modifier. Following is an example of a specification for the defaultvirtualbindings resource in a resource file: *defaultvirtualbindings: \ osfbackspace: <Key>BackSpace \n\ osfinsert: <Key>InsertChar \n\ osfdelete: <Key>DeleteChar \n\... osfleft: <Key>left, Ctrl<Key>H The format of a.motifbind file or of a file containing vendor bindings is the same, except that the binding specification for each keysym is placed on a separate line. The previous example specification appears as follows in a.motifbind or vendor bindings file: osfbackspace: <Key>BackSpace osfinsert: <Key>InsertChar osfdelete: <Key>DeleteChar... osfleft: <Key>left, Ctrl<Key>H The following table lists the fixed fallback default bindings for osf keysyms. Motif Programmer s Reference 3

Fallback Default Bindings for osf Keysyms osf Keysym osfactivate: osfaddmode: osfbackspace: osfbeginline: osfcancel: osfclear: osfcopy: osfcut: osfdelete: osfdeselectall: osfdown: osfendline: osfhelp: osfinsert: osfleft: osfleftline: osfmenu: osfmenubar: osfnextminor: osfpagedown: osfpageleft: osfpageright: osfpageup: osfpaste: osfprimarypaste: osfpriorminor: osfreselect: osfrestore: osfright: osfrightline: osfselect: osfselectall: osfswitchdirection: osfundo: osfup: Fallback Default Binding KeyKP_Enter KeyExecute Shift<Key>F8 KeyBackSpace KeyHome KeyBegin KeyEscape KeyCancel KeyClear KeyDelete KeyDown KeyEnd KeyF1 KeyHelp KeyInsert KeyLeft ShiftKeyF10 KeyMenu KeyF10 ShiftKeyMenu KeyNext KeyPrior KeyRight KeySelect AltKeyReturn AltKeyKP_Enter KeyUndo KeyUp Changes in the Handling of Shifted Keys In conjunction with MIT X11R5 Patch 24, this version of Motif introduces a change in the way that keys involving the <Shift> modifier are processed. This change allows the numeric keypad to be used to generate numbers using the standard X mechanisms. Since the default behavior is now to honor the xmodmap keymap bindings, translations and virtual key bindings that use <Shift> may behave differently. A common symptom is that unshifted keypad and function keys (with or without other modifiers) produce the expected results, but shifted ones do not. To obtain the old behavior you can remove the shifted interpretation from problematic keys using the xmodmap utility. Each entry in a xmodmap keymap table contains up to four keysym bindings. The second and fourth keysyms are for shifted keys. If an expression contains only two keysyms, simply remove the second keysym. If an entry contains three or more keysyms, replace the second keysym with NoSymbol and remove the fourth keysym. Action Translations The translation table syntax used by Motif is completely specified in the X11R5 Toolkit Intrinsics Documentation. For the complete syntax description, and for general instructions about writing or modifying a translation table, please refer to this document. A brief summary of the translation table format, however, is included below. The syntax is defined as in the binding syntax specification above. Informal descriptions are contained in angle brackets (<>). TranslationTable= [ directive ] { production } directive = ( "#replace" "#override" "#augment") "\n" production = lhs ":" rhs "\n" lhs = ( event keyseq) {"," ( event keyseq) } keyseq = """ keychar { keychar } """ keychar = ( "[caret ]" "$" "\\") <ISO Latin 1 character> event = [ modifier_list ] "<" event_type ">" [ count ] {detail} Motif Programmer s Reference 4

modifier_list = ( ["!"][":"] { modifier } "None") modifier = [ "~" ] ( "@" <keysym> <name from table below>) count = "(" <positive integer> [ "+" ] ")" rhs = { action_name "(" [params] ")" } params = string { "," string } The string field need not be quoted unless it includes a space or tab character, or any comma, newline, or parenthesis. The entire list of string values making up the params field will ba passed to the named action routine. The details field may be used to specify a keysym that will identify a particular key event. For example, Key is the name of a type of event, but it must be modified by the details field to name a specific event, such as KeyA. Modifier Names The modifier list, which may be empty, consists of a list of modifier keys that must be pressed with the key sequence. The modifier keys may abbreviated with single letters, as in the following list of the familiar modifiers: s Shift c or [caret ] m or $ a Ctrl (Control) Meta Alt Other modifiers are available, such as "Mod5" and "Button2." These have no abbreviation (although the "Button" modifiers may be abbreviated in combination with events, as outlined below). If a modifier list has no entries, and is not "None", it means the position of the modifier keys is irrelevant. If modifiers are listed, the designated keys must be in the specified position, but the unlisted modifier keys are irrelevant. If the list begins with an exclamation point (!), however, the unlisted modifiers may not be asserted. In addition, if a modifier name is preceded by a tilde (~), the corresponding key must not be pressed. If a modifier list begins with a colon (:), X tries to use the standard modifiers (Shift and Lock), if present, to map the key event code into a recognized keysym. Event Types These are a few of the recognized event types. Key or KeyDown KeyUp BtnDown BtnUp Motion Enter A keyboard key was pressed. A keyboard key was released. A mouse button was pressed. A mouse button was released. The mouse pointer moved. The pointer entered the widget s window. Motif Programmer s Reference 5

Leave FocusIn FocusOut xmbind(1) The pointer left the widget s window. The widget has received focus. The widget has lost focus. There are some event abbreviations available. For example, Btn1Motion is actually a "Motion" event, modified with the "Button1" modifier (Button1<Motion>). Similarly, Btn3Up is actually a "BtnUp" event with the "Button3" modifier. These abbreviations are used extensively in the Motif translation tables. RELATED Motif Programmer s Reference 6