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 | 1 | enum { |
| 20 | 2 | KF= 0xF000, /* Rune: beginning of private Unicode space */ |
| 21 | 3 | Spec= 0xF800, |
| 22 | 4 | PF= Spec|0x20, /* num pad function key */ |
| 23 | 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 | 7 | Khome= KF|0x0D, |
| 26 | 8 | Kup= KF|0x0E, |
| 27 | 9 | Kdown= Kview, |
| @@ -42,12 +24,14 @@ enum { · 14 unmodified lines | ||
| 42 | 24 | Kscrollonedown= KF|0x21, |
| 43 | 25 | |
| 44 | 26 | /* multimedia keys - no refunds */ |
| 45 | − Ksbwd= KF|0x22, | |
| 46 | − Ksfwd= KF|0x23, | |
| 47 | − Kpause= KF|0x24, | |
| 48 | − Kvoldn= KF|0x25, | |
| 49 | − Kvolup= KF|0x26, | |
| 50 | − Kmute= KF|0x27, | |
| 27 | + Ksbwd= KF|0x22, /* skip backwards */ | |
| 28 | + Ksfwd= KF|0x23, /* skip forward */ | |
| 29 | + Kpause= KF|0x24, /* play/pause */ | |
| 30 | + Kvoldn= KF|0x25, /* volume decrement */ | |
| 31 | + Kvolup= KF|0x26, /* volume increment */ | |
| 32 | + Kmute= KF|0x27, /* (un)mute */ | |
| 33 | + Kbrtdn= KF|0x28, /* brightness decrement */ | |
| 34 | + Kbrtup= KF|0x29, /* brightness increment */ | |
| 51 | 35 | |
| 52 | 36 | Ksoh= 0x01, |
| 53 | 37 | Kstx= 0x02, |