I wrote a script that dialog command is vulnerable to Esc key, now I want to disable Esc key in console.

NOTE: X11 has been not installed in server and xev or xmodmap doesn't work.

  • 2
    The console equivalent to xmodmap is loadkeys. Changing the keymap because of a problem in one application is overkill though. I'd look for an option to tell dialog to ignore the Escape key before reaching for that sledgehammer. – user41515 Sep 23 '14 at 10:39
  • Thanks Wumbley, I'm trying to solve the problem with loadkeys command. – Sepahrad Salour Sep 23 '14 at 11:24

We can disable ESC key with loadkeys command:

keymaps 0-127
keycode 1 =
press crtl+d

Or we can put them in a file and read the file with loadkeys command:

loadkeys FILE

NOTE: It just disable ESC key in console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.