}
/* Only handle keyboard keys. */
- if (msg->INPUT_PAGE != INPUT_PAGE_KEY)
+ if (msg->m_input_tty_event.page != INPUT_PAGE_KEY)
return;
/* Only handle known USB HID keyboard codes (the 00h-E7h range). */
- scode = msg->INPUT_CODE;
+ scode = msg->m_input_tty_event.code;
if (scode >= NR_SCAN_CODES)
return;
/* Is it a KEY RELEASE? */
- if (msg->INPUT_VALUE == INPUT_RELEASE)
+ if (msg->m_input_tty_event.value == INPUT_RELEASE)
scode |= RELEASE_BIT;
if (incount < KB_IN_BYTES) {
/* This message uses no message fields. */
#define TTY_INPUT_EVENT (TTY_RQ_BASE + 3) /* relayed input event */
-# define INPUT_PAGE m7_i2 /* usage page */
-# define INPUT_CODE m7_i3 /* usage code */
-# define INPUT_VALUE m7_i4 /* event value */
/*===========================================================================*
* Messages for input server and drivers *
} mess_sigcalls;
_ASSERT_MSG_SIZE(mess_sigcalls);
+typedef struct {
+ int id;
+ int page;
+ int code;
+ int value;
+ int flags;
+
+ uint8_t padding[36];
+} mess_input_tty_event;
+_ASSERT_MSG_SIZE(mess_input_tty_event);
+
typedef struct {
time_t acnt_queue;
mess_notify m_notify;
mess_sigcalls m_sigcalls;
+ mess_input_tty_event m_input_tty_event;
+
mess_krn_lsys_schedule m_krn_lsys_schedule;
mess_krn_lsys_sys_fork m_krn_lsys_sys_fork;
mess_krn_lsys_sys_getwhoami m_krn_lsys_sys_getwhoami;
else if (mux_dev->opened)
input_process(mux_dev, m);
else {
- m->m_type = TTY_INPUT_EVENT;
+ message fwd;
+ mess_input_tty_event *tty_event = &(fwd.m_input_tty_event);
- if ((r = ipc_send(TTY_PROC_NR, m)) != OK)
+ fwd.m_type = TTY_INPUT_EVENT;
+ tty_event->id = m->m_linputdriver_input_event.id;
+ tty_event->page = m->m_linputdriver_input_event.page;
+ tty_event->code = m->m_linputdriver_input_event.code;
+ tty_event->value = m->m_linputdriver_input_event.value;
+ tty_event->flags = m->m_linputdriver_input_event.flags;
+
+ if ((r = ipc_send(TTY_PROC_NR, &fwd)) != OK)
printf("INPUT: send to TTY failed (%d)\n", r);
}
}