diff options
author | rsc <devnull@localhost> | 2003-09-30 17:47:41 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2003-09-30 17:47:41 +0000 |
commit | b2cfc4e2e71d0f0a5113ddfbd93c8285cc4d74e4 (patch) | |
tree | f382987fec33cf639d75b1fe1b5d76b8f155d074 /include/keyboard.h | |
parent | 5f7d5e8d1899f41b0e5366c0251530ea1dc753d0 (diff) | |
download | plan9port-b2cfc4e2e71d0f0a5113ddfbd93c8285cc4d74e4.tar.gz plan9port-b2cfc4e2e71d0f0a5113ddfbd93c8285cc4d74e4.tar.bz2 plan9port-b2cfc4e2e71d0f0a5113ddfbd93c8285cc4d74e4.zip |
Initial revision
Diffstat (limited to 'include/keyboard.h')
-rw-r--r-- | include/keyboard.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/keyboard.h b/include/keyboard.h new file mode 100644 index 00000000..a6d99bf6 --- /dev/null +++ b/include/keyboard.h @@ -0,0 +1,36 @@ +typedef struct Keyboardctl Keyboardctl; + +struct Keyboardctl +{ + struct Channel *c; /* chan(Rune)[20] */ + + char *file; + int consfd; /* to cons file */ + int ctlfd; /* to ctl file */ + int pid; /* of slave proc */ +}; + + +extern Keyboardctl* initkeyboard(char*); +extern int ctlkeyboard(Keyboardctl*, char*); +extern void closekeyboard(Keyboardctl*); + +enum { + KF= 0xF000, /* Rune: beginning of private Unicode space */ + /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */ + Khome= KF|0x0D, + Kup= KF|0x0E, + Kpgup= KF|0x0F, + Kprint= KF|0x10, + Kleft= KF|0x11, + Kright= KF|0x12, + Kdown= 0x80, + Kview= 0x80, + Kpgdown= KF|0x13, + Kins= KF|0x14, + Kend= '\r', /* [sic] */ + + Kalt= KF|0x15, + Kshift= KF|0x16, + Kctl= KF|0x17, +}; |