2005-07-19 15:21:51 +02:00
|
|
|
#include "sysutil.h"
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* fkey_ctl *
|
|
|
|
*===========================================================================*/
|
2005-06-20 16:23:31 +02:00
|
|
|
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 */
|
2005-04-21 16:53:53 +02:00
|
|
|
{
|
|
|
|
/* 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;
|
2005-06-20 16:23:31 +02:00
|
|
|
int s;
|
|
|
|
m.FKEY_REQUEST = request;
|
|
|
|
m.FKEY_FKEYS = (fkeys) ? *fkeys : 0;
|
|
|
|
m.FKEY_SFKEYS = (sfkeys) ? *sfkeys : 0;
|
2005-08-03 10:14:08 +02:00
|
|
|
s = _taskcall(TTY_PROC_NR, FKEY_CONTROL, &m);
|
2005-06-20 16:23:31 +02:00
|
|
|
if (fkeys) *fkeys = m.FKEY_FKEYS;
|
|
|
|
if (sfkeys) *sfkeys = m.FKEY_SFKEYS;
|
|
|
|
return(s);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|