Renamed src/lib/utils to src/lib/sysutil --- because of new src/lib/util
This commit is contained in:
27
lib/sysutil/fkey_ctl.c
Normal file
27
lib/sysutil/fkey_ctl.c
Normal file
@@ -0,0 +1,27 @@
|
||||
#include "sysutil.h"
|
||||
|
||||
/*===========================================================================*
|
||||
* fkey_ctl *
|
||||
*===========================================================================*/
|
||||
PUBLIC int fkey_ctl(request, fkeys, sfkeys)
|
||||
int request; /* request to perform */
|
||||
int *fkeys; /* bit masks for F1-F12 keys */
|
||||
int *sfkeys; /* bit masks for Shift F1-F12 keys */
|
||||
{
|
||||
/* Send a message to the TTY server to request notifications for function
|
||||
* key presses or to disable notifications. Enabling succeeds unless the key
|
||||
* is already bound to another process. Disabling only succeeds if the key is
|
||||
* bound to the current process.
|
||||
*/
|
||||
message m;
|
||||
int s;
|
||||
m.FKEY_REQUEST = request;
|
||||
m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
|
||||
m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
|
||||
s = _taskcall(TTY, FKEY_CONTROL, &m);
|
||||
if (fkeys) *fkeys = m.FKEY_FKEYS;
|
||||
if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
|
||||
return(s);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user