static unsigned char num_lock = 0;
static unsigned char caps_lock = 0;
static unsigned char scroll_lock = 0;
+static unsigned char ctrl = 0;
static unsigned char leds __attribute__ ((aligned (0x4)));
/* test if a character is in the queue */
static int usb_kbd_testc(void)
{
+#ifdef CFG_USB_EVENT_POLL
+ usb_event_poll();
+#endif
if(usb_in_pointer==usb_out_pointer)
return(0); /* no data */
else
else /* non shifted */
keycode=usb_kbd_numkey[scancode-0x1e];
}
+
+ if (ctrl)
+ keycode = scancode - 0x3;
+
if(pressed==1) {
if(scancode==NUM_LOCK) {
num_lock=~num_lock;
return 1;
}
res=0;
+
+ switch (new[0]) {
+ case 0x0: /* No combo key pressed */
+ ctrl = 0;
+ break;
+ case 0x01: /* Left Ctrl pressed */
+ case 0x10: /* Right Ctrl pressed */
+ ctrl = 1;
+ break;
+ }
+
for (i = 2; i < 8; i++) {
if (old[i] > 3 && memscan(&new[2], old[i], 6) == &new[8]) {
res|=usb_kbd_translate(old[i],new[0],0);