[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to disable certain keys



Hi,

> Bret Busby wrote:
> > How do I disable the <Caps Lock> key, and, how do I disable the left
> > hand <CTRL> key, and, how do I disable the <Windows> keys?

Brian wrote:
> xmodmap might have come up. In what way
> were the solutions involving this utility or other techniques you came
> across unsatisfactory?

This problem is as old as Unix.
man pages are too long, tell currently unwanted information,
and lack the example that solves the user's particular problem
(the real one, not the perceived one).

man xmodmap does not directly state that one should do

  xmodmap -e "keysym Caps_Lock = "
  xmodmap -e "keysym Control_L = "
  xmodmap -e "keysym Super_L = "
  xmodmap -e "keysym Super_R = "

It does not explicitely state how to get the keys back
by exploring their keycode with program "xev" and after
e.g. having learned that left Control is keycode 37: 
  xmodmap -e "keycode 37 = Control_L"

Finally it does not point to
  https://lists.debian.org/debian-user/2015/08/msg00302.html
by Francesco Ariis which makes a proposal where to put above
commands for automatic execution on start of X.

Only after knowing all this, the reader will recognize that
it was indeed written in the manual.
A corollary from Murphy's law, i guess.


(And who woulda thunk that it is so easy to make your
 X workstation completely unusable ... ?)


Have a nice day :)

Thomas


Reply to: