4

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.

6
  • A no-op where? In the UI, Terminal, TTY? Everywhere??? (The solution depends on this)
    – Fabby
    Feb 20, 2015 at 15:19
  • I updated the question to rule out TTY if that complicates things. Thanks!
    – Setjmp
    Feb 20, 2015 at 17:13
  • Do you use multiple keyboard lay-outs? (and no: everywhere is easier then "somewhere") ;-)
    – Fabby
    Feb 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.
    – Setjmp
    Feb 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.
    – Fabby
    Feb 20, 2015 at 17:29

2 Answers 2

3

To add context to SetJmp's answer in case you don't want to read through UbuntuForums:

  1. Run xev in a terminal
  2. Press the key that you want to disable (in this case, num lock). Note the keycode (in my case, 77)
  3. Run xmodmap -e 'keycode number = NoSymbol'. In my case, this was xmodmap -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.

2
  • 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."
    – EricS
    Dec 24, 2016 at 1:12
  • To start "Startup Applications Preferences", press ALT + F2 and run gnome-session-properties. Aug 25, 2018 at 1:19
0

I found this approach helpful:

http://ubuntuforums.org/showthread.php?t=842970

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .