diff options
author | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
---|---|---|
committer | Taru Karttunen <taruti@taruti.net> | 2011-03-30 15:46:40 +0300 |
commit | e5888a1ffdae813d7575f5fb02275c6bb07e5199 (patch) | |
tree | d8d51eac403f07814b9e936eed0c9a79195e2450 /sys/src/cmd/unix/drawterm/include/keyboard.h |
Import sources from 2011-03-30 iso image
Diffstat (limited to 'sys/src/cmd/unix/drawterm/include/keyboard.h')
-rwxr-xr-x | sys/src/cmd/unix/drawterm/include/keyboard.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/sys/src/cmd/unix/drawterm/include/keyboard.h b/sys/src/cmd/unix/drawterm/include/keyboard.h new file mode 100755 index 000000000..d5d89ab00 --- /dev/null +++ b/sys/src/cmd/unix/drawterm/include/keyboard.h @@ -0,0 +1,44 @@ +#ifdef PLAN9 +#pragma src "/sys/src/libdraw" +#pragma lib "libdraw.a" +#endif + +typedef struct Keyboardctl Keyboardctl; +typedef struct Channel Channel; + +struct Keyboardctl +{ + 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 */ + Spec= 0xF800, + /* 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= Spec|0x00, + Kview= Spec|0x00, + Kpgdown= KF|0x13, + Kins= KF|0x14, + Kend= KF|0x18, + + Kalt= KF|0x15, + Kshift= KF|0x16, + Kctl= KF|0x17, +}; + |