Commit fb31220f authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Keyboard.c: reformat nxagentKeycodeConversionSetup

parent 3c4a8da1
...@@ -1644,35 +1644,34 @@ void nxagentKeycodeConversionSetup(char * rules, char * model) ...@@ -1644,35 +1644,34 @@ void nxagentKeycodeConversionSetup(char * rules, char * model)
{ {
fprintf(stderr, "Info: Keycode conversion is off\n"); fprintf(stderr, "Info: Keycode conversion is off\n");
nxagentKeycodeConversion = False; nxagentKeycodeConversion = False;
return;
} }
else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn) else if (nxagentOption(KeycodeConversion) == KeycodeConversionOn)
{ {
fprintf(stderr, "Info: Keycode conversion is on\n"); fprintf(stderr, "Info: Keycode conversion is on\n");
nxagentKeycodeConversion = True; nxagentKeycodeConversion = True;
return;
}
if (rules && model &&
(strcmp(rules, "evdev") == 0 ||
strcmp(model, "evdev") == 0))
{
#ifdef DEBUG
fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__);
#endif
fprintf(stderr, "Info: Keycode conversion auto-determined as on\n");
nxagentKeycodeConversion = True;
} }
else else
{ {
#ifdef DEBUG if (rules && model &&
fprintf(stderr, "%s: Deactivating KeyCode conversion.\n", __func__); (strcmp(rules, "evdev") == 0 ||
#endif strcmp(model, "evdev") == 0))
{
#ifdef DEBUG
fprintf(stderr, "%s: Activating KeyCode conversion.\n", __func__);
#endif
fprintf(stderr, "Info: Keycode conversion auto-determined as off\n"); fprintf(stderr, "Info: Keycode conversion auto-determined as on\n");
nxagentKeycodeConversion = True;
}
else
{
#ifdef DEBUG
fprintf(stderr, "%s: Deactivating KeyCode conversion.\n", __func__);
#endif
nxagentKeycodeConversion = False; fprintf(stderr, "Info: Keycode conversion auto-determined as off\n");
nxagentKeycodeConversion = False;
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment