73 |
73 |
74 Look for X resources of running applications:: |
74 Look for X resources of running applications:: |
75 |
75 |
76 $ xprop -root |
76 $ xprop -root |
77 $ xprop -name bash # for xterm with running bash inside |
77 $ xprop -name bash # for xterm with running bash inside |
|
78 |
|
79 Keyboard's keys under X window. |
|
80 =============================== |
|
81 |
|
82 scancodes |
|
83 hardware-dependent codes generated by keystrokes and received by |
|
84 the X server. |
|
85 keycodes |
|
86 Codes sent by the X server to the client indicating which key |
|
87 was pressed. Keycodes by themselves do not indicate what the |
|
88 keystroke means; the client must request that information from |
|
89 the X server. |
|
90 modifiers |
|
91 Flags, such as ``shift'' and ``control,'' that the server sends |
|
92 with each keycode to the client. The client's interpretation of |
|
93 the keycode may depend on the state of the modifiers. For |
|
94 example, the state of the shift modifier determines whether an |
|
95 alphabetic character should be lowercase or uppercase. Because |
|
96 the X server encodes the states of the eight modifiers (shift, |
|
97 lock, control, mod1, mod2, mod3, mod4, and mod5) in a single |
|
98 byte of data, modifiers are often referred to as ``modifier |
|
99 bits.'' |
|
100 keysyms |
|
101 codes that specify the glyphs appearing on the keys. The X |
|
102 server also maintains a list of strings that describe the |
|
103 keysyms, such as ``a'', ``B'', and ``Control.'' |
|
104 |
|
105 Find the keycode. |
|
106 ================= |
|
107 |
|
108 :: |
|
109 |
|
110 $ xev |
|
111 $ cat /usr/include/X11/keysymdef.h |
|
112 |
|
113 Don't run under X:: |
|
114 |
|
115 $ showkey |
|
116 |
|
117 To do same under X:: |
|
118 |
|
119 $ xev | sed -n 's=.*keycode \([0-9]*\).*=\1=p' |
|
120 |
|
121 List key modifier:: |
|
122 |
|
123 $ xmodmap -pm |
|
124 |
|
125 Add keycode to modifier:: |
|
126 |
|
127 $ xmodmap -e "add shift = Shift_R" |
|
128 |
|
129 Remove keycode from modifier:: |
|
130 |
|
131 $ xmodmap -e "remove shift = Shift_L" |
|
132 |
|
133 Examining the current keymap table:: |
|
134 |
|
135 $ xmodmap -pk |
|
136 |
|
137 Changing the keymap table:: |
|
138 |
|
139 $ xmodmap -e "keycode 34 = bracketleft braceleft" |
|
140 $ xmodmap -e "keysym CapsLock = Control_L" |
|
141 |
|
142 https://wiki.ubuntu.com/LaptopTesting/Keycodes |
|
143 Ubuntu Keycodes howto. |
|
144 http://en.gentoo-wiki.com/wiki/Multimedia_Keys |
|
145 Gentoo Multimedia Keys howto. |
78 |
146 |
79 Making screenshort. |
147 Making screenshort. |
80 =================== |
148 =================== |
81 :: |
149 :: |
82 |
150 |