70 lines · 1.7 KB · Text
RawDownload
.TH KBMAP 3 .SH NAMEkbmap \- keyboard map.SH SYNOPSIS.nf.B bind -a #κ /dev .B /dev/kbmap.fi.SH DESCRIPTION.PPThe.I kbmapdevice serves a one-level directory containing a single file,.BR kbmap ,representing the kernel's mapping ofkeyboard scan codes to Unicode characters(see.IR cons (3)and.IR keyboard (6))..PPReads return the current contents of the map.Each entry is one line containing three 11 character numeric fields, each followed by a space:a table number, an index into the table (scan code), and the decimal valueof the corresponding Unicode character (0 if none).The table numbers are platform dependent; they typically distinguishbetween unshifted and shifted keys.The scan code values are hardware dependent and can varyfrom keyboard to keyboard..PPWrites to the file change the map.Lines written to the file must contain three space-separated fields,representing the table number, scan code index, and Unicode character.Values are taken to be decimal unless they start with.B 0x(hexadecimal) or.B 0(octal).The Unicode character can also be represented as.BI ' xwhere.I xgives the UTF-8 representation of the character(see.IR utf (6)),or as .BI ^ Xto represent a control character..PPThe Unicode character can also be.BI M nto represent mouse button.IR n .The map.B /sys/lib/kbmap/mouse-fnmaps the F1 through F5 keys to the three mouse buttons and the twoscroll wheel buttons.Similarly, .B mouse-csamaps the left Control, Start, and Alt keys to the three mouse buttons.These maps are useful on laptops without three-button mice..SH "SEE ALSO".IR cons (3),.IR keyboard (6),.IR utf (6).SH FILES.B /sys/lib/kbmap/*.SH SOURCE.B /sys/src/9/port/devkbmap.c