Download XTOOLS X WINDOW SERVER USER`S GUIDE

Transcript
6
ADVANCED FEATURES
Keyboard Mapping
.K. E. .Y. B. .O. .A. R. .D. . M. . A. .P. P. .I .N. G. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
By default, Xtools is designed to use the default keyboard mapping that exists
within OS X. For the most part, this default functionality should operate properly with
local and remote X11 applications. Certain conditions may arise that warrant a change
in this default behavior. For instance, if you find your self constantly hitting the caps
lock key while entering file paths into your xterm, or you wish to switch between your
U.S. keyboard mapping and a Japanese layout, X11 provides you with a relatively
quick and painless way of doing so with the xmodmap command.
There are two ways of using xmodmap, by typing commands in a terminal
window, or loading a keymap file. If you are simply changing one or two keys, it may
be easier to just enter the commands into your terminal window. If on the other hand,
you are entering a whole new keyboard mapping, you may want to save the mapping
into a text file and load it into Xtools with the xmodmap command. The following will
cover both techniques.
V IA C OMMAND L INE :
Let's say that I am using an application that is case sensitive, and at no point will I
want to activate the caps lock key, because everything I type in is to be lowercase and
hitting caps lock will waste valuable time back tracking. Using xmodmap, I can disable
the caps lock key with one simple command:
% xmodmap -e "keysym Caps_Lock ="
the -e option tells xmodmap that what follows is an expression, and "keysym
Caps_Lock =" is the expression. Normally, if you were altering a key, you'd reassign it
to another character, digit or symbol, and that symbol would follow the "=" sign. In
this case, we want the caps lock key to do nothing when pressed, so we leave the right
hand side of the expression blank. The descriptor "keysym" precedes all xmodmap
expressions. For more information about keysyms, refer to the "Keyboard" section of
the X manual page.
52
Keyboard Mapping
Xtools X Window Server User’s Guide