source: trunk/minix/lib/sysutil/fkey_ctl.c@ 15

Last change on this file since 15 was 9, checked in by Mattia Monga, 14 years ago

Minix 3.1.2a

File size: 955 bytes
Line 
1#include "sysutil.h"
2
3/*===========================================================================*
4 * fkey_ctl *
5 *===========================================================================*/
6PUBLIC int fkey_ctl(request, fkeys, sfkeys)
7int request; /* request to perform */
8int *fkeys; /* bit masks for F1-F12 keys */
9int *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.