3

I like typical GUI shortcuts:

  • Ctrl+Backspace
  • Ctrl+Del

And other typical shortcuts. Are there any ready .bashrc with all this shortcuts available?

Praveen
  • 103
  • 4
m0nhawk
  • 2,627

1 Answers1

3

Can you do this in .bashrc? I think xbindkeys is the way to go in X.

Or, to get for example Emacs keybindings (the meta key up and running), scrolling shortcuts, etc., this will depend on your terminal (e.g., urxvt, xterm) - then, a place to look for configuration is ~/.Xresources.

In the console, I found that, I can setup shortcuts in this file:

/etc/console-setup/cached_UTF-8_del.kmap.gz

Just open and edit regardless of the extension. The shortcuts look like this:

alt keycode 36 = Decr_Console
alt keycode 37 = Incr_Console
alt keycode 15 = Incr_Console
alt keycode 39 = Scroll_Forward
alt keycode 25 = Scroll_Backward

(You can get the codes with showkey.)

To make it work, in

/etc/default/keyboard

I put

KMAP=/etc/console-setup/cached_UTF-8_del.kmap.gz

It's not really any and all commands you'd like (check out man keymaps and dumpkeys -l for those I've found). But it is a start.

Emanuel Berg
  • 6,903
  • 8
  • 44
  • 65
  • How did you derive (the 36 in) alt keycode 36 = Decr_Console from 0x0210 Decr_Console (see dumpkeys -l)? – argle Jan 08 '17 at 13:32