vfs/mount/rs/service changes:
[minix3.git] / lib / sysutil / fkey_ctl.c
blob38ea0f209760993f825fba4fa35ea693b5f57d88
1 #include "sysutil.h"
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 */
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);