Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Next: , Previous: Named ASCII Chars, Up: Key Bindings


57.4.9 Non-ASCII Characters on the Keyboard

If your keyboard has keys that send non-ASCII characters, such as accented letters, rebinding these keys must be done by using a vector like this1:

     (global-set-key [?char] 'some-function)

Type C-q followed by the key you want to bind, to insert char.

Since this puts a non-ASCII character in the .emacs, you should specify a coding system for that file that supports the character in question. See Init Syntax.

Warning: if you change the keyboard encoding, or change between multibyte and unibyte mode, or anything that would alter which code C-q would insert for that character, you'll need to edit the Lisp expression accordingly, to use the character code generated by C-q in the new mode.


Footnotes

[1] Note that you should avoid the string syntax for binding non-ASCII characters, since they will be interpreted as meta keys. See Strings of Events.



 
 
  Published under the terms of the GNU General Public License Design by Interspire