]> git.friedersdorff.com Git - max/tmk_keyboard.git/blob - converter/pc98_usb/command_extra.c
Add initial files for PC98
[max/tmk_keyboard.git] / converter / pc98_usb / command_extra.c
1 #include "stdbool.h"
2 #include "stdint.h"
3 #include "keycode.h"
4 #include "serial.h"
5 #include "print.h"
6 #include "command.h"
7
8 bool command_extra(uint8_t code)
9 {
10     switch (code) {
11         case KC_H:
12         case KC_SLASH: /* ? */
13             print("\n\n----- Sun converter Help -----\n");
14             print("UP:  Bell On\n");
15             print("DOWN:        Bell Off\n");
16             print("LEFT:        Click On\n");
17             print("RIGHT:       Click Off\n");
18             return false;
19         case KC_UP:
20             print("Bell On\n");
21             serial_send(0x02);
22             break;
23         case KC_DOWN:
24             print("Bell Off\n");
25             serial_send(0x03);
26             break;
27         case KC_LEFT:
28             print("Click On\n");
29             serial_send(0x0A);
30             break;
31         case KC_RIGHT:
32             print("Click Off\n");
33             serial_send(0x0B);
34             break;
35         case KC_NUMLOCK:
36             print("layout\n");
37             serial_send(0x0F);
38             break;
39         default:
40             return false;
41     }
42     return true;
43 }