2005-07-19 15:21:51 +02:00
|
|
|
#include "sysutil.h"
|
2013-11-03 22:33:44 +01:00
|
|
|
#include <string.h>
|
2005-04-21 16:53:53 +02:00
|
|
|
|
|
|
|
/*===========================================================================*
|
|
|
|
* fkey_ctl *
|
|
|
|
*===========================================================================*/
|
2012-03-25 20:25:53 +02:00
|
|
|
int fkey_ctl(request, fkeys, sfkeys)
|
2005-06-20 16:23:31 +02:00
|
|
|
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;
|
2013-11-03 22:33:44 +01:00
|
|
|
memset(&m, 0, sizeof(m));
|
2014-06-04 17:23:50 +02:00
|
|
|
m.m_lsys_tty_fkey_ctl.request = request;
|
|
|
|
m.m_lsys_tty_fkey_ctl.fkeys = (fkeys) ? *fkeys : 0;
|
|
|
|
m.m_lsys_tty_fkey_ctl.sfkeys = (sfkeys) ? *sfkeys : 0;
|
2013-05-01 21:01:17 +02:00
|
|
|
s = _taskcall(TTY_PROC_NR, TTY_FKEY_CONTROL, &m);
|
2014-06-04 17:23:50 +02:00
|
|
|
if (fkeys) *fkeys = m.m_tty_lsys_fkey_ctl.fkeys;
|
|
|
|
if (sfkeys) *sfkeys = m.m_tty_lsys_fkey_ctl.sfkeys;
|
2005-06-20 16:23:31 +02:00
|
|
|
return(s);
|
2005-04-21 16:53:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|