Rev | Line | |
---|
[9] | 1 | #include "sysutil.h"
|
---|
| 2 |
|
---|
| 3 | /*===========================================================================*
|
---|
| 4 | * fkey_ctl *
|
---|
| 5 | *===========================================================================*/
|
---|
| 6 | PUBLIC int fkey_ctl(request, fkeys, sfkeys)
|
---|
| 7 | int request; /* request to perform */
|
---|
| 8 | int *fkeys; /* bit masks for F1-F12 keys */
|
---|
| 9 | int *sfkeys; /* bit masks for Shift F1-F12 keys */
|
---|
| 10 | {
|
---|
| 11 | /* Send a message to the TTY server to request notifications for function
|
---|
| 12 | * key presses or to disable notifications. Enabling succeeds unless the key
|
---|
| 13 | * is already bound to another process. Disabling only succeeds if the key is
|
---|
| 14 | * bound to the current process.
|
---|
| 15 | */
|
---|
| 16 | message m;
|
---|
| 17 | int s;
|
---|
| 18 | m.FKEY_REQUEST = request;
|
---|
| 19 | m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
|
---|
| 20 | m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
|
---|
| 21 | s = _taskcall(TTY_PROC_NR, FKEY_CONTROL, &m);
|
---|
| 22 | if (fkeys) *fkeys = m.FKEY_FKEYS;
|
---|
| 23 | if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
|
---|
| 24 | return(s);
|
---|
| 25 | }
|
---|
| 26 |
|
---|
| 27 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.