include/tpl_drv_keyboard.h File Reference


Detailed Description

Keyboard Driver Interface Definitions.

Author:
John Hodge (thePowersGang)

VFS Layout

Keyboard drivers consist of only a single node, which is a normal file node with a size of zero. All reads and writes to this node are ignored (tVFS_Node.Read and tVFS_Node.Write are NULL)

Go to the source code of this file.

Defines

#define DRV_KEYBAORD_IOCTLNAMES   "getset_repeat_rate", "getset_repeat_delay", "set_callback"

Typedefs

typedef void(* tKeybardCallback )(Uint32 Key)
 Callback type for KB_IOCTL_SETCALLBACK.

Enumerations

enum  eTplKeyboard_IOCtl { KB_IOCTL_REPEATRATE = 4, KB_IOCTL_REPEATDELAY, KB_IOCTL_SETCALLBACK }
 

Common Keyboard IOCtl Calls.

More...
enum  eTplKeyboard_KeyCodes {
  KEY_ESC = 0x1B, KEY_NP_MASK = 0x40000000, KEY_CAPSLOCK, KEY_UP,
  KEY_DOWN, KEY_LEFT, KEY_RIGHT, KEY_F1,
  KEY_F2, KEY_F3, KEY_F4, KEY_F5,
  KEY_F6, KEY_F7, KEY_F8, KEY_F9,
  KEY_F10, KEY_F11, KEY_F12, KEY_NUMLOCK,
  KEY_SCROLLLOCK, KEY_HOME, KEY_END, KEY_INS,
  KEY_DEL, KEY_PAUSE, KEY_BREAK, KEY_PGUP,
  KEY_PGDOWN, KEY_KPENTER, KEY_KPSLASH, KEY_KPMINUS,
  KEY_KPPLUS, KEY_KPSTAR, KEY_KPHOME, KEY_KPUP,
  KEY_KPPGUP, KEY_KPLEFT, KEY_KP5, KEY_KPRIGHT,
  KEY_KPEND, KEY_KPDOWN, KEY_KPPGDN, KEY_KPINS,
  KEY_KPDEL, KEY_WIN, KEY_MENU, KEY_MODIFIERS = 0x60000000,
  KEY_LCTRL, KEY_RCTRL, KEY_LALT, KEY_RALT,
  KEY_LSHIFT, KEY_RSHIFT
}
 

Symbolic key codes.

More...

Typedef Documentation

typedef void(* tKeybardCallback)(Uint32 Key)

Callback type for KB_IOCTL_SETCALLBACK.

Parameters:
Key Unicode character code for the pressed key (with bit 31 set if the key is released)

Enumeration Type Documentation

Common Keyboard IOCtl Calls.

Enumerator:
KB_IOCTL_REPEATRATE 

Get/Set Repeat Rate.

ioctl(..., int *Rate)

Parameters:
Rate New repeat rate (pointer)
Returns:
Current/New Repeat rate

Gets/Set the repeat rate (actually the time in miliseconds between repeats) of a held down key. If the rate is set to zero, repeating will be disabled.

KB_IOCTL_REPEATDELAY 

Get/Set Repeat Delay.

ioctl(..., int *Delay)

Parameters:
Delay New repeat delay (pointer)
Returns:
Current/New repeat delay

Gets/Set the time in miliseconds before a key starts repeating after a key is pressed. Setting the delay to a negative number will cause the function to return -1

KB_IOCTL_SETCALLBACK 

Sets the callback.

ioctl(..., tKeybardCallback *Callback)

Note:
Can be called from kernel mode only

Sets the function to be called when a key event occurs (press, release or repeat). This function pointer must be in kernel mode (although, kernel->user or kernel->ring3driver abstraction functions can be used)

Symbolic key codes.

These key codes represent non-pritable characters and are placed above the Unicode character space. If the using driver recieves a key code with the 31st bit set, it means that that key has been released.

Enumerator:
KEY_ESC 

Escape Character.

Generated on Mon Feb 14 15:21:30 2011 for Acess2 by  doxygen 1.6.3