Added possibility to inject input events to tty

M    include/Makefile
A    include/minix/input.h
M    include/minix/com.h
M    drivers/tty/keyboard.c
M    drivers/tty/tty.c
M    drivers/tty/tty.h
M    include/minix/syslib.h
M    lib/libsys/Makefile
A    lib/libsys/input.c
This commit is contained in:
Dirk Vogt
2010-11-17 14:53:07 +00:00
parent 4ee146c00a
commit c22564335f
9 changed files with 132 additions and 44 deletions

View File

@@ -29,7 +29,7 @@ INCS+= minix/a.out.h minix/bitmap.h minix/callnr.h minix/cdrom.h \
minix/sysutil.h minix/timers.h minix/tty.h minix/type.h minix/types.h \
minix/u64.h minix/vfsif.h minix/vm.h minix/vtreefs.h minix/gcov.h \
minix/compiler.h minix/compiler-ack.h minix/sha2.h minix/sha1.h minix/md5.h \
minix/audio_fw.h minix/hash.h
minix/audio_fw.h minix/hash.h minix/input.h
INCS+= net/hton.h net/if.h net/ioctl.h net/netlib.h
INCS+= net/gen/arp_io.h net/gen/dhcp.h net/gen/ether.h \
net/gen/eth_hdr.h net/gen/eth_io.h net/gen/icmp.h \

View File

@@ -22,6 +22,7 @@
* 0xE00 - 0xEFF Common system messages (e.g. system signals)
* 0xF00 - 0xFFF Scheduling messages
* 0x1000 - 0x10FF Notify messages
* 0x1300 - 0x13FF TTY Input
*
* Zero and negative values are widely used for OK and error responses.
*/
@@ -1172,6 +1173,18 @@
/* SCHEDULING_INHERIT is like SCHEDULING_START, but without _QUANTUM field */
#define SCHEDULING_INHERIT (SCHEDULING_BASE+5)
/*===========================================================================*
* TTY INPUT INJECTION *
*===========================================================================*/
#define INPUT_BASE 0x1300
#define INPUT_EVENT (INPUT_BASE + 0)
# define INPUT_TYPE m4_l1
# define INPUT_CODE m4_l2
# define INPUT_VALUE m4_l3
#endif
/* _MINIX_COM_H */

8
include/minix/input.h Normal file
View File

@@ -0,0 +1,8 @@
#ifndef _MINIX_INPUT_H
#define _MINIX_INPUT_H
#define INPUT_EV_KEY 0x1
#define INPUT_EV_REL 0x2
#define INPUT_EV_ABS 0x3
#endif

View File

@@ -268,5 +268,8 @@ _PROTOTYPE( int sys_profbuf, (void *ctl_ptr, void *mem_ptr) );
_PROTOTYPE( int sys_getmcontext, (endpoint_t proc, mcontext_t *mcp) );
_PROTOTYPE( int sys_setmcontext, (endpoint_t proc, mcontext_t *mcp) );
/* input */
_PROTOTYPE( int tty_input_inject, (int type, int code, int val) );
#endif /* _SYSLIB_H */