The Linux keyboard driver
Use loadkeys to change the code produced by the BackSpace key from Delete to BackSpace:
% loadkeys keycode 14 = BackSpace
Assign the string “emacs\n” to the function key F12, and “rm *~\n” to Shift-F12 (the keycode 88 was found using showkey; the F66 is a random unused function key symbol):
% loadkeys keycode 88 = F12 shift keycode 88 = F66 string F12 = "emacs\n" string F66 = "rm *~\n"
Create the compose combination that will compose | and S into $:
% loadkeys compose '|' 'S' to '$' compose 'S' '|' to '$'
Reset to some default state:
% loadkeys -d
After the above handling, the obtained character(s) are put in the raw tty queue. Depending on the mode of the tty, they will be processed and transferred to the cooked tty queue. (Don't confuse raw mode as stty knows it, with the raw scancode mode discussed above.) Finally, the application will get them when it does getchar();.
Andries Brouwer, email@example.com, has used Unix for various mathematical, linguistic, and playful purposes the past 20 years or so. He might be known to some for the first net release of hack.
- Give new life to old phones and tablets with these tips!
- Readers' Choice Awards--Nominate Your Apps & Gadgets Now!
- Memory Ordering in Modern Microprocessors, Part I
- Tech Tip: Really Simple HTTP Server with Python
- diff -u: What's New in Kernel Development
- RSS Feeds
- Returning Values from Bash Functions
- Security Hardening with Ansible
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014