Unified · Split
| @@ -1,27 +1,9 @@ | |||
| 1 | typedef struct Keyboardctl Keyboardctl; | ||
| 2 | typedef struct Channel Channel; | ||
| 3 | |||
| 4 | struct Keyboardctl | ||
| 5 | { | ||
| 6 | Channel *c; /* chan(Rune)[20] */ | ||
| 7 | |||
| 8 | char *file; | ||
| 9 | int consfd; /* to cons file */ | ||
| 10 | int ctlfd; /* to ctl file */ | ||
| 11 | int pid; /* of slave proc */ | ||
| 12 | }; | ||
| 13 | |||
| 14 | |||
| 15 | extern Keyboardctl* initkeyboard(char*); | ||
| 16 | extern int ctlkeyboard(Keyboardctl*, char*); | ||
| 17 | extern void closekeyboard(Keyboardctl*); | ||
| 18 | |||
| 19 | enum { | 1 | enum { |
| 20 | KF= 0xF000, /* Rune: beginning of private Unicode space */ | 2 | KF= 0xF000, /* Rune: beginning of private Unicode space */ |
| 21 | Spec= 0xF800, | 3 | Spec= 0xF800, |
| 22 | PF= Spec|0x20, /* num pad function key */ | 4 | PF= Spec|0x20, /* num pad function key */ |
| 23 | Kview= Spec|0x00, /* view (shift window up) */ | 5 | Kview= Spec|0x00, /* view (shift window up) */ |
| 24 | /* KF|1, KF|2, ..., KF|0xC is F1, F2, ..., F12 */ | 6 | /* KF|1, KF|2, ..., KF|0xC is *respectively* F1, F2, ..., F12 */ |
| 25 | Khome= KF|0x0D, | 7 | Khome= KF|0x0D, |
| 26 | Kup= KF|0x0E, | 8 | Kup= KF|0x0E, |
| 27 | Kdown= Kview, | 9 | Kdown= Kview, |
| @@ -42,12 +24,14 @@ enum { · 14 unmodified lines | |||
| 42 | Kscrollonedown= KF|0x21, | 24 | Kscrollonedown= KF|0x21, |
| 43 | 25 | ||
| 44 | /* multimedia keys - no refunds */ | 26 | /* multimedia keys - no refunds */ |
| 45 | Ksbwd= KF|0x22, | 27 | Ksbwd= KF|0x22, /* skip backwards */ |
| 46 | Ksfwd= KF|0x23, | 28 | Ksfwd= KF|0x23, /* skip forward */ |
| 47 | Kpause= KF|0x24, | 29 | Kpause= KF|0x24, /* play/pause */ |
| 48 | Kvoldn= KF|0x25, | 30 | Kvoldn= KF|0x25, /* volume decrement */ |
| 49 | Kvolup= KF|0x26, | 31 | Kvolup= KF|0x26, /* volume increment */ |
| 50 | Kmute= KF|0x27, | 32 | Kmute= KF|0x27, /* (un)mute */ |
| 33 | Kbrtdn= KF|0x28, /* brightness decrement */ | ||
| 34 | Kbrtup= KF|0x29, /* brightness increment */ | ||
| 51 | 35 | ||
| 52 | Ksoh= 0x01, | 36 | Ksoh= 0x01, |
| 53 | Kstx= 0x02, | 37 | Kstx= 0x02, |