This key is close to others on my keyboard which contributes to some accidental key presses. I would like this key to be a no-op. I am mainly interested in a solution that works when I log in via Unity desktop. Gnome-terminal is a critical app where this causes me problems. I don't log into TTY very often, so I don't think I need a solution that works in that domain if it is different from the Unity desktop.
-
A no-op where? In the UI, Terminal, TTY? Everywhere??? (The solution depends on this)– FabbyFeb 20, 2015 at 15:19
-
I updated the question to rule out TTY if that complicates things. Thanks!– SetjmpFeb 20, 2015 at 17:13
-
Do you use multiple keyboard lay-outs? (and no: everywhere is easier then "somewhere") ;-)– FabbyFeb 20, 2015 at 17:22
-
All of my keyboards are US QWERTY. However, there are different keyboards I use to interact with this machine. One is a Goldtouch keyboard that is directly plugged in. Another is a attached to my mac laptop that I use in the context of remote desktop. The Mac keyboard gives me no problems. I also have a Goldtouch keyboard at home (similar to my office one) that I use when plugging the Macbook into my home KVM switch.– SetjmpFeb 20, 2015 at 17:27
-
Oh, it's a Mac... Sorry, I won't be able to help you then... I know nothing about Mac keyboards.– FabbyFeb 20, 2015 at 17:29
|
Show 1 more comment
2 Answers
To add context to SetJmp's answer in case you don't want to read through UbuntuForums:
- Run
xev
in a terminal - Press the key that you want to disable (in this case, num lock). Note the keycode (in my case, 77)
- Run
xmodmap -e 'keycode number = NoSymbol'
. In my case, this wasxmodmap -e 'keycode 77 = NoSymbol'
I haven't tested if the keycode is standard across computers or if additional steps are needed to make it persist across reboots.
-
77 on my dell laptop too. According to that linked forum discussion "To make it permanent, put this command in the System, Preferences, Sessions, Startup Programs folder, Add."– EricSDec 24, 2016 at 1:12
-
To start "Startup Applications Preferences", press ALT + F2 and run
gnome-session-properties
. Aug 25, 2018 at 1:19