Prev | Current Page 329 | Next

Chris Tyler

"X Power Tools"

4 Controlling the Keyboard
Many programs have special functions that can be invoked using function keys, Altor
Ctrl-key combinations, or Alt-Ctrl-Shift-modified mouse clicks. To prevent the
users from accessing these functions, you can modify the keyboard map using the X
Keyboard Extension or the xmodmap command. In most cases, the xmodmap command
provides the simplest solution.
Here is an xmodmap file that will disable the Ctrl, Alt, and CapsLock keys as well as
function keys F1??“F12:
! clear unneeded modifier keys
clear CTRL
clear mod1
clear mod2
clear mod3
clear mod4
clear mod5
clear lock
! clear the function keys (F1-F12)
keysym 0xffbe =
keysym 0xffbf =
keysym 0xffc0 =
keysym 0xffc1 =
keysym 0xffc2 =
keysym 0xffc3 =
keysym 0xffc4 =
keysym 0xffc5 =
keysym 0xffc6 =
keysym 0xffc7 =
keysym 0xffc8 =
keysym 0xffc9 =
To use this file, pass the filename (/usr/local/kiosk/xmodmap.txt in this case) to
xmodmap as an argument:
$ xmodmap /usr/local/kiosk/xmodmap.txt
To disable other keys, discover the keycode by running the xev utility, then add additional
lines to clear out the key symbols (also called keysyms) associated with that
keycode. For example, to disable the A key, run xev and press the A key.


Pages:
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341
wyświetlacz xperia ścianki biurowe hosting bad credit loans instant decision no brokers projektowanie ogrodów łódź