Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4581 → Rev 4153

/branches/network/uspace/srv/kbd/genarch/stroke.c
31,18 → 31,17
*/
/**
* @file
* @brief Stroke simulator.
* @brief Stroke simulator.
*
* When simulating a keyboard using a serial TTY we need to convert the
* recognized strokes (such as Shift-A) to sequences of key presses and
* releases (such as 'press Shift, press A, release A, release Shift').
*
*/
 
#include <stroke.h>
#include <kbd.h>
#include <io/console.h>
#include <io/keycode.h>
#include <kbd/kbd.h>
#include <kbd/keycode.h>
 
/** Correspondence between modifers and the modifier keycodes. */
static unsigned int mods_keys[][2] = {
59,7 → 58,7
i = 0;
while (mods_keys[i][0] != 0) {
if (mod & mods_keys[i][0]) {
kbd_push_ev(KEY_PRESS, mods_keys[i][1]);
kbd_push_ev(KE_PRESS, mods_keys[i][1]);
}
++i;
}
66,8 → 65,8
 
/* Simulate key press and release. */
if (key != 0) {
kbd_push_ev(KEY_PRESS, key);
kbd_push_ev(KEY_RELEASE, key);
kbd_push_ev(KE_PRESS, key);
kbd_push_ev(KE_RELEASE, key);
}
 
/* Simulate modifier releases. */
74,7 → 73,7
i = 0;
while (mods_keys[i][0] != 0) {
if (mod & mods_keys[i][0]) {
kbd_push_ev(KEY_RELEASE, mods_keys[i][1]);
kbd_push_ev(KE_RELEASE, mods_keys[i][1]);
}
++i;
}
82,4 → 81,4
 
/**
* @}
*/
*/
/branches/network/uspace/srv/kbd/genarch/gsp.c
49,7 → 49,7
*/
 
#include <gsp.h>
#include <adt/hash_table.h>
#include <libadt/hash_table.h>
#include <stdlib.h>
#include <stdio.h>