int key, int release)
{
struct input_key_xlate *table;
- int flip = -1;
int i;
/* Start with the main table, and see what modifiers change it */
/* Handle the lighted keys */
if (!release) {
+ int flip = -1;
+
switch (key) {
case KEY_SCROLLLOCK:
flip = FLAG_SCROLL_LOCK;
flip = FLAG_CAPS_LOCK;
break;
}
- }
- if (flip != -1) {
- int leds = 0;
-
- config->leds ^= flip;
- if (config->flags & FLAG_NUM_LOCK)
- leds |= INPUT_LED_NUM;
- if (config->flags & FLAG_CAPS_LOCK)
- leds |= INPUT_LED_CAPS;
- if (config->flags & FLAG_SCROLL_LOCK)
- leds |= INPUT_LED_SCROLL;
- config->leds = leds;
+ if (flip != -1) {
+ int leds = 0;
+
+ config->leds ^= flip;
+ if (config->flags & FLAG_NUM_LOCK)
+ leds |= INPUT_LED_NUM;
+ if (config->flags & FLAG_CAPS_LOCK)
+ leds |= INPUT_LED_CAPS;
+ if (config->flags & FLAG_SCROLL_LOCK)
+ leds |= INPUT_LED_SCROLL;
+ config->leds = leds;
+ }
}
return table;