Changeset 46b60e6 in mainline
- Timestamp:
- 2011-06-12T16:56:50Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 9c0242b
- Parents:
- 60e5a856
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/usbhid/kbd/kbddev.c
r60e5a856 r46b60e6 161 161 static void default_connection_handler(ddf_fun_t *, ipc_callid_t, ipc_call_t *); 162 162 163 /** 163 /** 164 164 * Default handler for IPC methods not handled by DDF. 165 165 * … … 220 220 * Handles turning of LED lights on and off. 221 221 * 222 * In case of USB keyboards, the LEDs are handled in the driver, not in the 223 * device. When there should be a change (lock key was pressed), the driver 224 * uses a Set_Report request sent to the device to set the state of the LEDs. 222 * As with most other keyboards, the LED indicators in USB keyboards are 223 * driven by software. When state of some modifier changes, the input server 224 * will call us and tell us to update the LED state and what the new state 225 * should be. 225 226 * 226 227 * This functions sets the LED lights according to current settings of modifiers … … 244 245 USB_HID_REPORT_TYPE_OUTPUT); 245 246 246 while (field != NULL) { 247 while (field != NULL) { 247 248 248 249 if ((field->usage == USB_HID_LED_NUM_LOCK) … … 287 288 288 289 /*----------------------------------------------------------------------------*/ 289 /** 290 * Processes key events. 291 * 292 * @note This function was copied from AT keyboard driver and modified to suit 293 * USB keyboard. 294 * 295 * @note Lock keys are not sent to the console, as they are completely handled 296 * in the driver. It may, however, be required later that the driver 297 * sends also these keys to application (otherwise it cannot use those 298 * keys at all). 299 * 290 /** Send key event. 291 * 300 292 * @param kbd_dev Keyboard device structure. 301 * @param type Type of the event (press / release). Recognized values: 293 * @param type Type of the event (press / release). Recognized values: 302 294 * KEY_PRESS, KEY_RELEASE 303 * @param key Key code of the key according to HID Usage Tables.295 * @param key Key code 304 296 */ 305 297 void usb_kbd_push_ev(usb_hid_dev_t *hid_dev, usb_kbd_t *kbd_dev, int type, … … 405 397 usb_log_debug2("Key pressed: %d (keycode: %d)\n", key, 406 398 kbd_dev->keys[i]); 399 printf("Key pressed: %d (keycode: %d)\n", key, 400 kbd_dev->keys[i]); 407 401 if (!usb_kbd_is_lock(key)) { 408 402 usb_kbd_repeat_start(kbd_dev, key);
Note:
See TracChangeset
for help on using the changeset viewer.