diff options
Diffstat (limited to 'keyboards/converter/ibm_terminal')
-rw-r--r-- | keyboards/converter/ibm_terminal/config.h | 112 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/ibm_terminal.c | 1 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/ibm_terminal.h | 81 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/info.json | 243 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/default/keymap.c | 63 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/default/rules.mk | 10 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/dsanchezseco/keymap.c | 58 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/dsanchezseco/rules.mk | 1 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/priyadi/config.h | 3 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c | 302 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk | 21 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/led.c | 33 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/matrix.c | 237 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/readme.md | 39 | ||||
-rw-r--r-- | keyboards/converter/ibm_terminal/rules.mk | 22 |
15 files changed, 1226 insertions, 0 deletions
diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h new file mode 100644 index 000000000..2cd36c5fb --- /dev/null +++ b/keyboards/converter/ibm_terminal/config.h | |||
@@ -0,0 +1,112 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <[email protected]> | ||
3 | Copyright 2016 Priyadi Iman Nurcahyo <[email protected]> | ||
4 | |||
5 | This program is free software: you can redistribute it and/or modify | ||
6 | it under the terms of the GNU General Public License as published by | ||
7 | the Free Software Foundation, either version 2 of the License, or | ||
8 | (at your option) any later version. | ||
9 | |||
10 | This program is distributed in the hope that it will be useful, | ||
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | GNU General Public License for more details. | ||
14 | |||
15 | You should have received a copy of the GNU General Public License | ||
16 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
17 | */ | ||
18 | |||
19 | #pragma once | ||
20 | |||
21 | #define VENDOR_ID 0xFEED | ||
22 | #define PRODUCT_ID 0x6535 | ||
23 | #define DEVICE_VER 0x0100 | ||
24 | #define MANUFACTURER QMK | ||
25 | #define PRODUCT IBM Terminal Keyboard | ||
26 | |||
27 | |||
28 | /* matrix size */ | ||
29 | #define MATRIX_ROWS 17 // keycode bit: 3-0 | ||
30 | #define MATRIX_COLS 8 // keycode bit: 6-4 | ||
31 | |||
32 | |||
33 | /* legacy keymap support */ | ||
34 | #define USE_LEGACY_KEYMAP | ||
35 | |||
36 | |||
37 | /* key combination for command */ | ||
38 | #define IS_COMMAND() ( \ | ||
39 | get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ | ||
40 | ) | ||
41 | |||
42 | |||
43 | /* | ||
44 | * PS/2 USART configuration for ATMega32U4 | ||
45 | */ | ||
46 | #ifdef PS2_USE_USART | ||
47 | /* XCK for clock line */ | ||
48 | #define PS2_CLOCK_PIN D5 | ||
49 | #define PS2_DATA_PIN D2 | ||
50 | |||
51 | /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ | ||
52 | /* set DDR of CLOCK as input to be slave */ | ||
53 | #define PS2_USART_INIT() do { \ | ||
54 | PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \ | ||
55 | PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \ | ||
56 | UCSR1C = ((1 << UMSEL10) | \ | ||
57 | (3 << UPM10) | \ | ||
58 | (0 << USBS1) | \ | ||
59 | (3 << UCSZ10) | \ | ||
60 | (0 << UCPOL1)); \ | ||
61 | UCSR1A = 0; \ | ||
62 | UBRR1H = 0; \ | ||
63 | UBRR1L = 0; \ | ||
64 | } while (0) | ||
65 | #define PS2_USART_RX_INT_ON() do { \ | ||
66 | UCSR1B = ((1 << RXCIE1) | \ | ||
67 | (1 << RXEN1)); \ | ||
68 | } while (0) | ||
69 | #define PS2_USART_RX_POLL_ON() do { \ | ||
70 | UCSR1B = (1 << RXEN1); \ | ||
71 | } while (0) | ||
72 | #define PS2_USART_OFF() do { \ | ||
73 | UCSR1C = 0; \ | ||
74 | UCSR1B &= ~((1 << RXEN1) | \ | ||
75 | (1 << TXEN1)); \ | ||
76 | } while (0) | ||
77 | #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1)) | ||
78 | #define PS2_USART_RX_DATA UDR1 | ||
79 | #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1))) | ||
80 | #define PS2_USART_RX_VECT USART1_RX_vect | ||
81 | #endif | ||
82 | |||
83 | |||
84 | /* | ||
85 | * PS/2 Interrupt configuration | ||
86 | */ | ||
87 | #ifdef PS2_USE_INT | ||
88 | /* uses INT1 for clock line(ATMega32U4) */ | ||
89 | #define PS2_CLOCK_PIN D1 | ||
90 | #define PS2_DATA_PIN D0 | ||
91 | |||
92 | #define PS2_INT_INIT() do { \ | ||
93 | EICRA |= ((1<<ISC11) | \ | ||
94 | (0<<ISC10)); \ | ||
95 | } while (0) | ||
96 | #define PS2_INT_ON() do { \ | ||
97 | EIMSK |= (1<<INT1); \ | ||
98 | } while (0) | ||
99 | #define PS2_INT_OFF() do { \ | ||
100 | EIMSK &= ~(1<<INT1); \ | ||
101 | } while (0) | ||
102 | #define PS2_INT_VECT INT1_vect | ||
103 | #endif | ||
104 | |||
105 | |||
106 | /* | ||
107 | * PS/2 Busywait configuration | ||
108 | */ | ||
109 | #ifdef PS2_USE_BUSYWAIT | ||
110 | #define PS2_CLOCK_PIN D1 | ||
111 | #define PS2_DATA_PIN D0 | ||
112 | #endif | ||
diff --git a/keyboards/converter/ibm_terminal/ibm_terminal.c b/keyboards/converter/ibm_terminal/ibm_terminal.c new file mode 100644 index 000000000..fd64a21ac --- /dev/null +++ b/keyboards/converter/ibm_terminal/ibm_terminal.c | |||
@@ -0,0 +1 @@ | |||
#include "ibm_terminal.h" | |||
diff --git a/keyboards/converter/ibm_terminal/ibm_terminal.h b/keyboards/converter/ibm_terminal/ibm_terminal.h new file mode 100644 index 000000000..ce50e5f43 --- /dev/null +++ b/keyboards/converter/ibm_terminal/ibm_terminal.h | |||
@@ -0,0 +1,81 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include "quantum.h" | ||
4 | |||
5 | #define XXX KC_NO | ||
6 | |||
7 | void matrix_init_user(void); | ||
8 | |||
9 | /* | ||
10 | * IBM Terminal keyboard 6110345(122keys)/1392595(102keys) | ||
11 | * http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M | ||
12 | * http://www.seasip.info/VintagePC/ibm_1391406.html | ||
13 | * | ||
14 | * Keymap array: | ||
15 | * 8 bytes | ||
16 | * +---------+ | ||
17 | * 0| | | ||
18 | * :| | 0x00-0x87 | ||
19 | * ;| | | ||
20 | * 17| | | ||
21 | * +---------+ | ||
22 | */ | ||
23 | #define LAYOUT( \ | ||
24 | k08, k10, k18, k20, k28, k30, k38, k40, k48, k50, k57, k5F, \ | ||
25 | k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, \ | ||
26 | \ | ||
27 | k05, k06, k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k5D, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ | ||
28 | k04, k0C, k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, k7C, \ | ||
29 | k03, k0B, k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k53, k5A, k63, k6B, k73, k74, k7B, \ | ||
30 | k83, k0A, k12, k13, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k51, k59, k61, k62, k6A, k69, k72, k7A, k79, \ | ||
31 | k01, k09, k11, k19, k29, k39, k58, k60, k68, k70, k71, k78 \ | ||
32 | ) { \ | ||
33 | { XXX, k01, XXX, k03, k04, k05, k06, k07 }, \ | ||
34 | { k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ | ||
35 | { k10, k11, k12, k13, k14, k15, k16, k17 }, \ | ||
36 | { k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ | ||
37 | { k20, k21, k22, k23, k24, k25, k26, k27 }, \ | ||
38 | { k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ | ||
39 | { k30, k31, k32, k33, k34, k35, k36, k37 }, \ | ||
40 | { k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ | ||
41 | { k40, k41, k42, k43, k44, k45, k46, k47 }, \ | ||
42 | { k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ | ||
43 | { k50, k51, k52, k53, k54, k55, k56, k57 }, \ | ||
44 | { k58, k59, k5A, k5B, k5C, k5D, k5E, k5F }, \ | ||
45 | { k60, k61, k62, k63, k64, k65, k66, k67 }, \ | ||
46 | { k68, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ | ||
47 | { k70, k71, k72, k73, k74, k75, k76, k77 }, \ | ||
48 | { k78, k79, k7A, k7B, k7C, k7D, k7E, XXX }, \ | ||
49 | { XXX, XXX, XXX, k83, k84, XXX, XXX, XXX } \ | ||
50 | } | ||
51 | |||
52 | /* | ||
53 | * IBM Terminal keyboard 1399625, 101-key | ||
54 | */ | ||
55 | #define LAYOUT_101( \ | ||
56 | k08, k07, k0F, k17, k1F, k27, k2F, k37, k3F, k47, k4F, k56, k5E, k57, k5F, k62, \ | ||
57 | \ | ||
58 | k0E, k16, k1E, k26, k25, k2E, k36, k3D, k3E, k46, k45, k4E, k55, k66, k67, k6E, k6F, k76, k77, k7E, k84, \ | ||
59 | k0D, k15, k1D, k24, k2D, k2C, k35, k3C, k43, k44, k4D, k54, k5B, k5C, k64, k65, k6D, k6C, k75, k7D, \ | ||
60 | k14, k1C, k1B, k23, k2B, k34, k33, k3B, k42, k4B, k4C, k52, k5A, k6B, k73, k74, k7C, \ | ||
61 | k12, k1A, k22, k21, k2A, k32, k31, k3A, k41, k49, k4A, k59, k63, k69, k72, k7A, \ | ||
62 | k11, k19, k29, k39, k58, k61, k60, k6A, k70, k71, k79 \ | ||
63 | ) { \ | ||
64 | { XXX, XXX, XXX, XXX, XXX, XXX, XXX, k07 }, \ | ||
65 | { k08, XXX, XXX, XXX, XXX, k0D, k0E, k0F }, \ | ||
66 | { XXX, k11, k12, XXX, k14, k15, k16, k17 }, \ | ||
67 | { XXX, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ | ||
68 | { XXX, k21, k22, k23, k24, k25, k26, k27 }, \ | ||
69 | { XXX, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \ | ||
70 | { XXX, k31, k32, k33, k34, k35, k36, k37 }, \ | ||
71 | { XXX, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \ | ||
72 | { XXX, k41, k42, k43, k44, k45, k46, k47 }, \ | ||
73 | { XXX, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \ | ||
74 | { XXX, XXX, k52, XXX, k54, k55, k56, k57 }, \ | ||
75 | { k58, k59, k5A, k5B, k5C, XXX, k5E, k5F }, \ | ||
76 | { k60, k61, k62, k63, k64, k65, k66, k67 }, \ | ||
77 | { XXX, k69, k6A, k6B, k6C, k6D, k6E, k6F }, \ | ||
78 | { k70, k71, k72, k73, k74, k75, k76, k77 }, \ | ||
79 | { XXX, k79, k7A, XXX, k7C, k7D, k7E, XXX }, \ | ||
80 | { XXX, XXX, XXX, XXX, k84, XXX, XXX, XXX } \ | ||
81 | } | ||
diff --git a/keyboards/converter/ibm_terminal/info.json b/keyboards/converter/ibm_terminal/info.json new file mode 100644 index 000000000..2c1a605ad --- /dev/null +++ b/keyboards/converter/ibm_terminal/info.json | |||
@@ -0,0 +1,243 @@ | |||
1 | { | ||
2 | "keyboard_name": "Keyboard converter for IBM terminal keyboard", | ||
3 | "url": "", | ||
4 | "maintainer": "qmk", | ||
5 | "layouts": { | ||
6 | "LAYOUT": { | ||
7 | "layout": [ | ||
8 | {"label":"F13", "x":3.25, "y":0}, | ||
9 | {"label":"F14", "x":4.25, "y":0}, | ||
10 | {"label":"F15", "x":5.25, "y":0}, | ||
11 | {"label":"F16", "x":6.25, "y":0}, | ||
12 | {"label":"F17", "x":7.25, "y":0}, | ||
13 | {"label":"F18", "x":8.25, "y":0}, | ||
14 | {"label":"F19", "x":9.25, "y":0}, | ||
15 | {"label":"F20", "x":10.25, "y":0}, | ||
16 | {"label":"F21", "x":11.25, "y":0}, | ||
17 | {"label":"F22", "x":12.25, "y":0}, | ||
18 | {"label":"F23", "x":13.25, "y":0}, | ||
19 | {"label":"F24", "x":14.25, "y":0}, | ||
20 | {"label":"F1", "x":3.25, "y":1}, | ||
21 | {"label":"F2", "x":4.25, "y":1}, | ||
22 | {"label":"F3", "x":5.25, "y":1}, | ||
23 | {"label":"F4", "x":6.25, "y":1}, | ||
24 | {"label":"F5", "x":7.25, "y":1}, | ||
25 | {"label":"F6", "x":8.25, "y":1}, | ||
26 | {"label":"F7", "x":9.25, "y":1}, | ||
27 | {"label":"F8", "x":10.25, "y":1}, | ||
28 | {"label":"F9", "x":11.25, "y":1}, | ||
29 | {"label":"F10", "x":12.25, "y":1}, | ||
30 | {"label":"F11", "x":13.25, "y":1}, | ||
31 | {"label":"F12", "x":14.25, "y":1}, | ||
32 | {"label":"Print Screen", "x":0, "y":3}, | ||
33 | {"label":"Esc", "x":1, "y":3}, | ||
34 | {"label":"Esc", "x":2.25, "y":3}, | ||
35 | {"label":"1", "x":3.25, "y":3}, | ||
36 | {"label":"2", "x":4.25, "y":3}, | ||
37 | {"label":"3", "x":5.25, "y":3}, | ||
38 | {"label":"4", "x":6.25, "y":3}, | ||
39 | {"label":"5", "x":7.25, "y":3}, | ||
40 | {"label":"6", "x":8.25, "y":3}, | ||
41 | {"label":"7", "x":9.25, "y":3}, | ||
42 | {"label":"8", "x":10.25, "y":3}, | ||
43 | {"label":"9", "x":11.25, "y":3}, | ||
44 | {"label":"0", "x":12.25, "y":3}, | ||
45 | {"label":"-", "x":13.25, "y":3}, | ||
46 | {"label":"=", "x":14.25, "y":3}, | ||
47 | {"label":"No", "x":15.25, "y":3}, | ||
48 | {"label":"Back Space", "x":16.25, "y":3}, | ||
49 | {"label":"Insert", "x":17.5, "y":3}, | ||
50 | {"label":"Home", "x":18.5, "y":3}, | ||
51 | {"label":"Page Up", "x":19.5, "y":3}, | ||
52 | {"label":"Num Lock", "x":20.75, "y":3}, | ||
53 | {"label":"/", "x":21.75, "y":3}, | ||
54 | {"label":"*", "x":22.75, "y":3}, | ||
55 | {"label":"-", "x":23.75, "y":3}, | ||
56 | {"label":"Scroll Lock", "x":0, "y":4}, | ||
57 | {"label":"Int4", "x":1, "y":4}, | ||
58 | {"label":"Tab", "x":2.25, "y":4, "w":1.5}, | ||
59 | {"label":"Q", "x":3.75, "y":4}, | ||
60 | {"label":"W", "x":4.75, "y":4}, | ||
61 | {"label":"E", "x":5.75, "y":4}, | ||
62 | {"label":"R", "x":6.75, "y":4}, | ||
63 | {"label":"T", "x":7.75, "y":4}, | ||
64 | {"label":"Y", "x":8.75, "y":4}, | ||
65 | {"label":"U", "x":9.75, "y":4}, | ||
66 | {"label":"I", "x":10.75, "y":4}, | ||
67 | {"label":"O", "x":11.75, "y":4}, | ||
68 | {"label":"P", "x":12.75, "y":4}, | ||
69 | {"label":"[", "x":13.75, "y":4}, | ||
70 | {"label":"]", "x":14.75, "y":4}, | ||
71 | {"label":"No", "x":15.75, "y":4, "w":1.5}, | ||
72 | {"label":"Delete", "x":17.5, "y":4}, | ||
73 | {"label":"End", "x":18.5, "y":4}, | ||
74 | {"label":"Page Down", "x":19.5, "y":4}, | ||
75 | {"label":"7", "x":20.75, "y":4}, | ||
76 | {"label":"8", "x":21.75, "y":4}, | ||
77 | {"label":"9", "x":22.75, "y":4}, | ||
78 | {"label":"+", "x":23.75, "y":4}, | ||
79 | {"label":"Pause", "x":0, "y":5}, | ||
80 | {"label":"Int5", "x":1, "y":5}, | ||
81 | {"label":"Caps Lock", "x":2.25, "y":5, "w":1.75}, | ||
82 | {"label":"A", "x":4, "y":5}, | ||
83 | {"label":"S", "x":5, "y":5}, | ||
84 | {"label":"D", "x":6, "y":5}, | ||
85 | {"label":"F", "x":7, "y":5}, | ||
86 | {"label":"G", "x":8, "y":5}, | ||
87 | {"label":"H", "x":9, "y":5}, | ||
88 | {"label":"J", "x":10, "y":5}, | ||
89 | {"label":"K", "x":11, "y":5}, | ||
90 | {"label":"L", "x":12, "y":5}, | ||
91 | {"label":";", "x":13, "y":5}, | ||
92 | {"label":"'", "x":14, "y":5}, | ||
93 | {"label":"\\", "x":15, "y":5}, | ||
94 | {"label":"Enter", "x":16, "y":5, "w":1.25}, | ||
95 | {"label":"Up", "x":18.5, "y":5}, | ||
96 | {"label":"4", "x":20.75, "y":5}, | ||
97 | {"label":"5", "x":21.75, "y":5}, | ||
98 | {"label":"6", "x":22.75, "y":5}, | ||
99 | {"label":",", "x":23.75, "y":5}, | ||
100 | {"label":"App", "x":0, "y":6}, | ||
101 | {"label":"Int6", "x":1, "y":6}, | ||
102 | {"label":"Shift", "x":2.25, "y":6, "w":1.25}, | ||
103 | {"label":"ISO \\", "x":3.5, "y":6}, | ||
104 | {"label":"Z", "x":4.5, "y":6}, | ||
105 | {"label":"X", "x":5.5, "y":6}, | ||
106 | {"label":"C", "x":6.5, "y":6}, | ||
107 | {"label":"V", "x":7.5, "y":6}, | ||
108 | {"label":"B", "x":8.5, "y":6}, | ||
109 | {"label":"N", "x":9.5, "y":6}, | ||
110 | {"label":"M", "x":10.5, "y":6}, | ||
111 | {"label":",", "x":11.5, "y":6}, | ||
112 | {"label":".", "x":12.5, "y":6}, | ||
113 | {"label":"/", "x":13.5, "y":6}, | ||
114 | {"label":"No", "x":14.5, "y":6}, | ||
115 | {"label":"Shift", "x":15.5, "y":6, "w":1.75}, | ||
116 | {"label":"Left", "x":17.5, "y":6}, | ||
117 | {"label":"Int2", "x":18.5, "y":6}, | ||
118 | {"label":"Right", "x":19.5, "y":6}, | ||
119 | {"label":"1", "x":20.75, "y":6}, | ||
120 | {"label":"2", "x":21.75, "y":6}, | ||
121 | {"label":"3", "x":22.75, "y":6}, | ||
122 | {"label":"Enter", "x":23.75, "y":6}, | ||
123 | {"label":"RGUI", "x":0, "y":7}, | ||
124 | {"label":"lgui", "x":1, "y":7}, | ||
125 | {"label":"Ctrl", "x":2.25, "y":7, "w":1.5}, | ||
126 | {"label":"Alt", "x":4.75, "y":7, "w":1.5}, | ||
127 | {"label":"Space", "x":6.25, "y":7, "w":7}, | ||
128 | {"label":"Alt", "x":13.25, "y":7, "w":1.5}, | ||
129 | {"label":"Ctrl", "x":15.75, "y":7, "w":1.5}, | ||
130 | {"label":"Down", "x":18.5, "y":7}, | ||
131 | {"label":"No", "x":20.75, "y":7}, | ||
132 | {"label":"0", "x":21.75, "y":7}, | ||
133 | {"label":".", "x":22.75, "y":7}, | ||
134 | {"label":"No", "x":23.75, "y":7} | ||
135 | ] | ||
136 | }, | ||
137 | "LAYOUT_101": { | ||
138 | "layout": [ | ||
139 | {"label":"Esc", "x":0, "y":0}, | ||
140 | {"label":"F1", "x":2, "y":0}, | ||
141 | {"label":"F2", "x":3, "y":0}, | ||
142 | {"label":"F3", "x":4, "y":0}, | ||
143 | {"label":"F4", "x":5, "y":0}, | ||
144 | {"label":"F5", "x":6.5, "y":0}, | ||
145 | {"label":"F6", "x":7.5, "y":0}, | ||
146 | {"label":"F7", "x":8.5, "y":0}, | ||
147 | {"label":"F8", "x":9.5, "y":0}, | ||
148 | {"label":"F9", "x":11, "y":0}, | ||
149 | {"label":"F10", "x":12, "y":0}, | ||
150 | {"label":"F11", "x":13, "y":0}, | ||
151 | {"label":"F12", "x":14, "y":0}, | ||
152 | {"label":"Print Screen", "x":15.25, "y":0}, | ||
153 | {"label":"Scroll Lock", "x":16.25, "y":0}, | ||
154 | {"label":"Pause", "x":17.25, "y":0}, | ||
155 | {"label":"`", "x":0, "y":2}, | ||
156 | {"label":"1", "x":1, "y":2}, | ||
157 | {"label":"2", "x":2, "y":2}, | ||
158 | {"label":"3", "x":3, "y":2}, | ||
159 | {"label":"4", "x":4, "y":2}, | ||
160 | {"label":"5", "x":5, "y":2}, | ||
161 | {"label":"6", "x":6, "y":2}, | ||
162 | {"label":"7", "x":7, "y":2}, | ||
163 | {"label":"8", "x":8, "y":2}, | ||
164 | {"label":"9", "x":9, "y":2}, | ||
165 | {"label":"0", "x":10, "y":2}, | ||
166 | {"label":"-", "x":11, "y":2}, | ||
167 | {"label":"=", "x":12, "y":2}, | ||
168 | {"label":"Back Space", "x":13, "y":2, "w":2}, | ||
169 | {"label":"Insert", "x":15.25, "y":2}, | ||
170 | {"label":"Home", "x":16.25, "y":2}, | ||
171 | {"label":"Page Up", "x":17.25, "y":2}, | ||
172 | {"label":"Num Lock", "x":18.5, "y":2}, | ||
173 | {"label":"/", "x":19.5, "y":2}, | ||
174 | {"label":"*", "x":20.5, "y":2}, | ||
175 | {"label":"-", "x":21.5, "y":2}, | ||
176 | {"label":"Tab", "x":0, "y":3, "w":1.5}, | ||
177 | {"label":"Q", "x":1.5, "y":3}, | ||
178 | {"label":"W", "x":2.5, "y":3}, | ||
179 | {"label":"E", "x":3.5, "y":3}, | ||
180 | {"label":"R", "x":4.5, "y":3}, | ||
181 | {"label":"T", "x":5.5, "y":3}, | ||
182 | {"label":"Y", "x":6.5, "y":3}, | ||
183 | {"label":"U", "x":7.5, "y":3}, | ||
184 | {"label":"I", "x":8.5, "y":3}, | ||
185 | {"label":"O", "x":9.5, "y":3}, | ||
186 | {"label":"P", "x":10.5, "y":3}, | ||
187 | {"label":"[", "x":11.5, "y":3}, | ||
188 | {"label":"]", "x":12.5, "y":3}, | ||
189 | {"label":"\\", "x":13.5, "y":3, "w":1.5}, | ||
190 | {"label":"Delete", "x":15.25, "y":3}, | ||
191 | {"label":"End", "x":16.25, "y":3}, | ||
192 | {"label":"Page Down", "x":17.25, "y":3}, | ||
193 | {"label":"7", "x":18.5, "y":3}, | ||
194 | {"label":"8", "x":19.5, "y":3}, | ||
195 | {"label":"9", "x":20.5, "y":3}, | ||
196 | {"label":"Caps Lock", "x":0, "y":4, "w":1.75}, | ||
197 | {"label":"A", "x":1.75, "y":4}, | ||
198 | {"label":"S", "x":2.75, "y":4}, | ||
199 | {"label":"D", "x":3.75, "y":4}, | ||
200 | {"label":"F", "x":4.75, "y":4}, | ||
201 | {"label":"G", "x":5.75, "y":4}, | ||
202 | {"label":"H", "x":6.75, "y":4}, | ||
203 | {"label":"J", "x":7.75, "y":4}, | ||
204 | {"label":"K", "x":8.75, "y":4}, | ||
205 | {"label":"L", "x":9.75, "y":4}, | ||
206 | {"label":";", "x":10.75, "y":4}, | ||
207 | {"label":"'", "x":11.75, "y":4}, | ||
208 | {"label":"Enter", "x":12.75, "y":4, "w":2.25}, | ||
209 | {"label":"4", "x":18.5, "y":4}, | ||
210 | {"label":"5", "x":19.5, "y":4}, | ||
211 | {"label":"6", "x":20.5, "y":4}, | ||
212 | {"label":"+", "x":21.5, "y":3, "h":2}, | ||
213 | {"label":"Shift", "x":0, "y":5, "w":2.25}, | ||
214 | {"label":"Z", "x":2.25, "y":5}, | ||
215 | {"label":"X", "x":3.25, "y":5}, | ||
216 | {"label":"C", "x":4.25, "y":5}, | ||
217 | {"label":"V", "x":5.25, "y":5}, | ||
218 | {"label":"B", "x":6.25, "y":5}, | ||
219 | {"label":"N", "x":7.25, "y":5}, | ||
220 | {"label":"M", "x":8.25, "y":5}, | ||
221 | {"label":",", "x":9.25, "y":5}, | ||
222 | {"label":".", "x":10.25, "y":5}, | ||
223 | {"label":"/", "x":11.25, "y":5}, | ||
224 | {"label":"Shift", "x":12.25, "y":5, "w":2.75}, | ||
225 | {"label":"Up", "x":16.25, "y":5}, | ||
226 | {"label":"1", "x":18.5, "y":5}, | ||
227 | {"label":"2", "x":19.5, "y":5}, | ||
228 | {"label":"3", "x":20.5, "y":5}, | ||
229 | {"label":"Ctrl", "x":0, "y":6, "w":1.5}, | ||
230 | {"label":"Alt", "x":2.5, "y":6, "w":1.5}, | ||
231 | {"label":"Space", "x":4, "y":6, "w":7}, | ||
232 | {"label":"Alt", "x":11, "y":6, "w":1.5}, | ||
233 | {"label":"Ctrl", "x":13.5, "y":6, "w":1.5}, | ||
234 | {"label":"Left", "x":15.25, "y":6}, | ||
235 | {"label":"Down", "x":16.25, "y":6}, | ||
236 | {"label":"Right", "x":17.25, "y":6}, | ||
237 | {"label":"0", "x":18.5, "y":6, "w":2}, | ||
238 | {"label":".", "x":20.5, "y":6}, | ||
239 | {"label":"Enter", "x":21.5, "y":5, "h":2} | ||
240 | ] | ||
241 | } | ||
242 | } | ||
243 | } | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/default/keymap.c b/keyboards/converter/ibm_terminal/keymaps/default/keymap.c new file mode 100644 index 000000000..59187ef33 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/default/keymap.c | |||
@@ -0,0 +1,63 @@ | |||
1 | /* | ||
2 | Copyright 2012 Jun Wako <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
21 | // Layer 0 | ||
22 | |||
23 | LAYOUT( | ||
24 | KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, | ||
25 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
26 | |||
27 | KC_PSCR,KC_ESC, KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_NO, KC_BSPC, KC_INS, KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, | ||
28 | KC_SLCK,KC_INT4, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC, KC_NO, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
29 | KC_PAUS,KC_INT5, KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_BSLS,KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM, | ||
30 | KC_APP, KC_INT6, KC_LSFT,KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_LEFT,KC_INT2,KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
31 | KC_RGUI,KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_GRV, KC_DOWN, KC_NO, KC_P0, KC_PDOT,KC_NO | ||
32 | ), | ||
33 | |||
34 | /* 101-key keymaps | ||
35 | */ | ||
36 | /* 0: default | ||
37 | * ,---. ,---------------. ,---------------. ,---------------. ,-----------. | ||
38 | * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| | ||
39 | * `---' `---------------' `---------------' `---------------' `-----------' | ||
40 | * ,-----------------------------------------------------------. ,-----------. ,---------------. | ||
41 | * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -| | ||
42 | * |-----------------------------------------------------------| |-----------| |---------------| | ||
43 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | | ||
44 | * |-----------------------------------------------------------| `-----------' |-----------| +| | ||
45 | * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| | | ||
46 | * |-----------------------------------------------------------| ,---. |---------------| | ||
47 | * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | | ||
48 | * |-----------------------------------------------------------| ,-----------. |-----------|Ent| | ||
49 | * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| | | ||
50 | * `----' `---------------------------------------' `----' `-----------' `---------------' | ||
51 | */ | ||
52 | /* | ||
53 | LAYOUT_101( | ||
54 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR,KC_SLCK, KC_BRK, | ||
55 | |||
56 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,KC_MINS, KC_EQL,KC_BSPC, KC_INS,KC_HOME,KC_PGUP, KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, | ||
57 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,KC_LBRC,KC_RBRC,KC_BSLS, KC_DEL, KC_END,KC_PGDN, KC_P7, KC_P8, KC_P9, | ||
58 | KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,KC_PPLS, | ||
59 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, | ||
60 | KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT,KC_PENT | ||
61 | ), | ||
62 | */ | ||
63 | }; | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk new file mode 100644 index 000000000..e3cb087a7 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk | |||
@@ -0,0 +1,10 @@ | |||
1 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
2 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
3 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
4 | CONSOLE_ENABLE = no # Console for debug | ||
5 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
6 | NKRO_ENABLE = yes | ||
7 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
8 | AUDIO_ENABLE = no # Audio output | ||
9 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
10 | PS2_USE_USART = yes | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/keymap.c b/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/keymap.c new file mode 100644 index 000000000..3828f09f5 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/keymap.c | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | Copyright 2020 dsanchezseco | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 2 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | |||
15 | #include QMK_KEYBOARD_H | ||
16 | |||
17 | enum layers { | ||
18 | DVO, // dvorak | ||
19 | QWE, // qwerty | ||
20 | SYS, // system | ||
21 | }; | ||
22 | |||
23 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
24 | /* dvorak */ | ||
25 | [DVO] = LAYOUT( | ||
26 | KC_VOLD, KC_VOLU, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PSCR, KC_PAUS, MO(SYS), | ||
27 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
28 | |||
29 | LCTL(KC_A), LCTL(KC_Z), KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_BSPC, KC_PEQL, KC_PSLS, KC_PAST, | ||
30 | LCTL(KC_B), LCTL(KC_X), KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, XXXXXXX, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PMNS, | ||
31 | LCTL(KC_D), LCTL(KC_C), KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_BSLS, KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PPLS, | ||
32 | LCTL(KC_F), LCTL(KC_V), KC_LSFT, KC_BSLS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, XXXXXXX, KC_RSFT, KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
33 | LCTL(KC_G), LCTL(KC_W), KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LGUI, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX | ||
34 | ), | ||
35 | /* qwerty */ | ||
36 | [QWE] = LAYOUT( | ||
37 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
38 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
39 | |||
40 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, | ||
41 | _______, _______, _______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, | ||
42 | _______, _______, _______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
43 | _______, _______, _______, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, | ||
44 | _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX | ||
45 | ), | ||
46 | |||
47 | /* system */ | ||
48 | [SYS] = LAYOUT( | ||
49 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, | ||
50 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
51 | |||
52 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, KC_NLCK, _______, _______, _______, | ||
53 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, | ||
54 | _______, _______, _______, _______, _______, _______, _______, _______, TO(DVO), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
55 | _______, _______, _______, _______, _______, TO(QWE), _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, _______, | ||
56 | _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, XXXXXXX | ||
57 | ), | ||
58 | }; | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/rules.mk b/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/rules.mk new file mode 100644 index 000000000..0a5b666e8 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/dsanchezseco/rules.mk | |||
@@ -0,0 +1 @@ | |||
MOUSEKEY_ENABLE = no | |||
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/config.h b/keyboards/converter/ibm_terminal/keymaps/priyadi/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/config.h | |||
@@ -0,0 +1,3 @@ | |||
1 | #pragma once | ||
2 | |||
3 | // place overrides here | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c new file mode 100644 index 000000000..3d6da6eab --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c | |||
@@ -0,0 +1,302 @@ | |||
1 | /* | ||
2 | Copyright 2016 Priyadi Iman Nurcahyo <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include QMK_KEYBOARD_H | ||
19 | |||
20 | enum layers { | ||
21 | QWE, // qwerty | ||
22 | COL, // colemak | ||
23 | WOR, // workman | ||
24 | DVO, // dvorak | ||
25 | |||
26 | MOU, // mouse keys | ||
27 | EMO, // emoji | ||
28 | SYS, // system | ||
29 | }; | ||
30 | |||
31 | enum keycodes { | ||
32 | // default layout switcher | ||
33 | LAY_QWE = SAFE_RANGE, | ||
34 | LAY_COL, | ||
35 | LAY_WOR, | ||
36 | LAY_DVO, | ||
37 | |||
38 | // layer switchers | ||
39 | LYR_SYS, | ||
40 | LYR_EMO, | ||
41 | |||
42 | // os switchers | ||
43 | OS_LIN, | ||
44 | OS_WIN, | ||
45 | OS_MAC, | ||
46 | }; | ||
47 | |||
48 | // unicode map | ||
49 | |||
50 | enum unicode_name { | ||
51 | GRIN, // grinning face 😊 | ||
52 | TJOY, // tears of joy 😂 | ||
53 | SMILE, // grining face with smiling eyes 😁 | ||
54 | HEART, // heart ❤ | ||
55 | EYERT, // smiling face with heart shaped eyes 😍 | ||
56 | CRY, // crying face 😭 | ||
57 | SMEYE, // smiling face with smiling eyes 😊 | ||
58 | UNAMU, // unamused 😒 | ||
59 | KISS, // kiss 😘 | ||
60 | HART2, // two hearts 💕 | ||
61 | WEARY, // weary 😩 | ||
62 | OKHND, // ok hand sign 👌 | ||
63 | PENSV, // pensive 😔 | ||
64 | SMIRK, // smirk 😏 | ||
65 | RECYC, // recycle ♻ | ||
66 | WINK, // wink 😉 | ||
67 | THMUP, // thumb up 👍 | ||
68 | THMDN, // thumb down 👎 | ||
69 | PRAY, // pray 🙏 | ||
70 | PHEW, // relieved 😌 | ||
71 | MUSIC, // musical notes | ||
72 | FLUSH, // flushed 😳 | ||
73 | CELEB, // celebration 🙌 | ||
74 | CRY2, // crying face 😢 | ||
75 | COOL, // smile with sunglasses 😎 | ||
76 | NOEVS, // see no evil | ||
77 | NOEVH, // hear no evil | ||
78 | NOEVK, // speak no evil | ||
79 | POO, // pile of poo | ||
80 | EYES, // eyes | ||
81 | VIC, // victory hand | ||
82 | BHART, // broken heart | ||
83 | SLEEP, // sleeping face | ||
84 | SMIL2, // smiling face with open mouth & sweat | ||
85 | HUNRD, // 100 | ||
86 | CONFU, // confused | ||
87 | TONGU, // face with tongue & winking eye | ||
88 | DISAP, // disappointed | ||
89 | YUMMY, // face savoring delicious food | ||
90 | CLAP, // hand clapping | ||
91 | FEAR, // face screaming in fear | ||
92 | HORNS, // smiling face with horns | ||
93 | HALO, // smiling face with halo | ||
94 | BYE, // waving hand | ||
95 | SUN, // sun | ||
96 | MOON, // moon | ||
97 | SKULL, // skull | ||
98 | }; | ||
99 | |||
100 | const uint32_t PROGMEM unicode_map[] = { | ||
101 | [GRIN] = 0x1F600, | ||
102 | [TJOY] = 0x1F602, | ||
103 | [SMILE] = 0x1F601, | ||
104 | [HEART] = 0x2764, | ||
105 | [EYERT] = 0x1f60d, | ||
106 | [CRY] = 0x1f62d, | ||
107 | [SMEYE] = 0x1F60A, | ||
108 | [UNAMU] = 0x1F612, | ||
109 | [KISS] = 0x1F618, | ||
110 | [HART2] = 0x1F495, | ||
111 | [WEARY] = 0x1F629, | ||
112 | [OKHND] = 0x1F44C, | ||
113 | [PENSV] = 0x1F614, | ||
114 | [SMIRK] = 0x1F60F, | ||
115 | [RECYC] = 0x267B, | ||
116 | [WINK] = 0x1F609, | ||
117 | [THMUP] = 0x1F44D, | ||
118 | [THMDN] = 0x1F44E, | ||
119 | [PRAY] = 0x1F64F, | ||
120 | [PHEW] = 0x1F60C, | ||
121 | [MUSIC] = 0x1F3B6, | ||
122 | [FLUSH] = 0x1F633, | ||
123 | [CELEB] = 0x1F64C, | ||
124 | [CRY2] = 0x1F622, | ||
125 | [COOL] = 0x1F60E, | ||
126 | [NOEVS] = 0x1F648, | ||
127 | [NOEVH] = 0x1F649, | ||
128 | [NOEVK] = 0x1F64A, | ||
129 | [POO] = 0x1F4A9, | ||
130 | [EYES] = 0x1F440, | ||
131 | [VIC] = 0x270C, | ||
132 | [BHART] = 0x1F494, | ||
133 | [SLEEP] = 0x1F634, | ||
134 | [SMIL2] = 0x1F605, | ||
135 | [HUNRD] = 0x1F4AF, | ||
136 | [CONFU] = 0x1F615, | ||
137 | [TONGU] = 0x1F61C, | ||
138 | [DISAP] = 0x1F61E, | ||
139 | [YUMMY] = 0x1F60B, | ||
140 | [CLAP] = 0x1F44F, | ||
141 | [FEAR] = 0x1F631, | ||
142 | [HORNS] = 0x1F608, | ||
143 | [HALO] = 0x1F607, | ||
144 | [BYE] = 0x1F44B, | ||
145 | [SUN] = 0x2600, | ||
146 | [MOON] = 0x1F314, | ||
147 | [SKULL] = 0x1F480, | ||
148 | }; | ||
149 | |||
150 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
151 | /* qwerty */ | ||
152 | [QWE] = LAYOUT( | ||
153 | KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS, | ||
154 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
155 | |||
156 | MO(EMO), MO(SYS), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, XXXXXXX, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, | ||
157 | KC_MNXT, KC_VOLU, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, XXXXXXX, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS, | ||
158 | KC_MPLY, KC_MUTE, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_UP, KC_P4, KC_P5, KC_P6, KC_PCMM, | ||
159 | KC_MPRV, KC_VOLD, KC_LSFT, KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, XXXXXXX, KC_RSFT, KC_LEFT, TG(MOU), KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, | ||
160 | KC_LGUI, KC_APP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX | ||
161 | ), | ||
162 | |||
163 | /* colemak */ | ||
164 | [COL] = LAYOUT( | ||
165 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
166 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
167 | |||
168 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
169 | _______, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
170 | _______, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
171 | _______, _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
172 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
173 | ), | ||
174 | |||
175 | /* workman */ | ||
176 | [WOR] = LAYOUT( | ||
177 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
178 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
179 | |||
180 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
181 | _______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
182 | _______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
183 | _______, _______, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
184 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
185 | ), | ||
186 | |||
187 | /* dvorak */ | ||
188 | [DVO] = LAYOUT( | ||
189 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
190 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
191 | |||
192 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
193 | _______, _______, _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, | ||
194 | _______, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, _______, _______, _______, _______, _______, _______, _______, | ||
195 | _______, _______, _______, _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
196 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
197 | ), | ||
198 | |||
199 | /* system */ | ||
200 | [SYS] = LAYOUT( | ||
201 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
202 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
203 | |||
204 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
205 | _______, _______, _______, LAY_QWE, OS_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
206 | _______, _______, _______, _______, _______, LAY_DVO, _______, _______, _______, _______, LAY_WOR, OS_LIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
207 | _______, _______, _______, _______, _______, _______, LAY_COL, _______, _______, _______, OS_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
208 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
209 | ), | ||
210 | |||
211 | /* mouse keys */ | ||
212 | [MOU] = LAYOUT( | ||
213 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
214 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
215 | |||
216 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
217 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
218 | XXXXXXX, KC_BTN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
219 | XXXXXXX, KC_BTN5, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_L, _______, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
220 | KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
221 | ), | ||
222 | |||
223 | /* emoji */ | ||
224 | [EMO] = LAYOUT( | ||
225 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
226 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
227 | |||
228 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
229 | XXXXXXX, XXXXXXX, XXXXXXX, X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY), X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV),XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
230 | XXXXXXX, XXXXXXX, XXXXXXX, X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN), X(HEART),X(BYE), X(KISS), X(CELEB),X(COOL), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
231 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,X(SLEEP),X(CLAP), X(CRY), X(VIC), X(BHART),X(SUN), X(SMEYE),X(WINK), X(MOON), X(CONFU), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
232 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
233 | ), | ||
234 | |||
235 | /* | ||
236 | [XXX] = LAYOUT( | ||
237 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
238 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
239 | |||
240 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
241 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
242 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
243 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
244 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
245 | ), | ||
246 | */ | ||
247 | }; | ||
248 | |||
249 | void persistent_default_layer_set(uint16_t default_layer) { | ||
250 | eeconfig_update_default_layer(default_layer); | ||
251 | default_layer_set(default_layer); | ||
252 | } | ||
253 | |||
254 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
255 | switch (keycode) { | ||
256 | /* layout switcher */ | ||
257 | case LAY_QWE: | ||
258 | if (record->event.pressed) { | ||
259 | persistent_default_layer_set(1UL<<QWE); | ||
260 | } | ||
261 | return false; | ||
262 | break; | ||
263 | case LAY_COL: | ||
264 | if (record->event.pressed) { | ||
265 | persistent_default_layer_set(1UL<<COL); | ||
266 | } | ||
267 | return false; | ||
268 | break; | ||
269 | case LAY_WOR: | ||
270 | if (record->event.pressed) { | ||
271 | persistent_default_layer_set(1UL<<WOR); | ||
272 | } | ||
273 | return false; | ||
274 | break; | ||
275 | case LAY_DVO: | ||
276 | if (record->event.pressed) { | ||
277 | persistent_default_layer_set(1UL<<DVO); | ||
278 | } | ||
279 | return false; | ||
280 | break; | ||
281 | |||
282 | /* os switcher */ | ||
283 | case OS_LIN: | ||
284 | set_unicode_input_mode(UC_LNX); | ||
285 | return false; | ||
286 | break; | ||
287 | case OS_WIN: | ||
288 | set_unicode_input_mode(UC_WINC); | ||
289 | return false; | ||
290 | break; | ||
291 | case OS_MAC: | ||
292 | set_unicode_input_mode(UC_OSX); | ||
293 | return false; | ||
294 | break; | ||
295 | |||
296 | } | ||
297 | return true; | ||
298 | } | ||
299 | |||
300 | void matrix_init_user() { | ||
301 | set_unicode_input_mode(UC_LNX); | ||
302 | } | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk new file mode 100644 index 000000000..8c5f3d703 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk | |||
@@ -0,0 +1,21 @@ | |||
1 | # Build Options | ||
2 | # change to "no" to disable the options, or define them in the Makefile in | ||
3 | # the appropriate keymap folder that will get included automatically | ||
4 | # | ||
5 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
6 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
8 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
9 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
12 | MIDI_ENABLE = no # MIDI controls | ||
13 | AUDIO_ENABLE = no # Audio output on port C6 | ||
14 | UNICODE_ENABLE = no # Unicode | ||
15 | UNICODEMAP_ENABLE = yes | ||
16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
17 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
18 | PS2_USE_USART = yes | ||
19 | |||
20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
diff --git a/keyboards/converter/ibm_terminal/led.c b/keyboards/converter/ibm_terminal/led.c new file mode 100644 index 000000000..e0f31ee4e --- /dev/null +++ b/keyboards/converter/ibm_terminal/led.c | |||
@@ -0,0 +1,33 @@ | |||
1 | /* | ||
2 | Copyright 2011 Jun Wako <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include <stdint.h> | ||
19 | #include "ps2.h" | ||
20 | #include "led.h" | ||
21 | |||
22 | |||
23 | void led_set(uint8_t usb_led) | ||
24 | { | ||
25 | uint8_t ps2_led = 0; | ||
26 | if (usb_led & (1<<USB_LED_SCROLL_LOCK)) | ||
27 | ps2_led |= (1<<PS2_LED_SCROLL_LOCK); | ||
28 | if (usb_led & (1<<USB_LED_NUM_LOCK)) | ||
29 | ps2_led |= (1<<PS2_LED_NUM_LOCK); | ||
30 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) | ||
31 | ps2_led |= (1<<PS2_LED_CAPS_LOCK); | ||
32 | ps2_host_set_led(ps2_led); | ||
33 | } | ||
diff --git a/keyboards/converter/ibm_terminal/matrix.c b/keyboards/converter/ibm_terminal/matrix.c new file mode 100644 index 000000000..caa0a3805 --- /dev/null +++ b/keyboards/converter/ibm_terminal/matrix.c | |||
@@ -0,0 +1,237 @@ | |||
1 | /* | ||
2 | Copyright 2011 Jun Wako <[email protected]> | ||
3 | |||
4 | This program is free software: you can redistribute it and/or modify | ||
5 | it under the terms of the GNU General Public License as published by | ||
6 | the Free Software Foundation, either version 2 of the License, or | ||
7 | (at your option) any later version. | ||
8 | |||
9 | This program is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License | ||
15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
16 | */ | ||
17 | |||
18 | #include <stdint.h> | ||
19 | #include <stdbool.h> | ||
20 | #include <avr/io.h> | ||
21 | #include <util/delay.h> | ||
22 | #include "print.h" | ||
23 | #include "util.h" | ||
24 | #include "debug.h" | ||
25 | #include "ps2.h" | ||
26 | #include "matrix.h" | ||
27 | |||
28 | #define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) | ||
29 | #define print_matrix_header() print("\nr/c 01234567\n") | ||
30 | #define matrix_bitpop(i) bitpop(matrix[i]) | ||
31 | #define ROW_SHIFTER ((uint8_t)1) | ||
32 | |||
33 | |||
34 | static void matrix_make(uint8_t code); | ||
35 | static void matrix_break(uint8_t code); | ||
36 | |||
37 | |||
38 | /* | ||
39 | * Matrix Array usage: | ||
40 | * 'Scan Code Set 3' is assigned into 17x8 cell matrix. | ||
41 | * | ||
42 | * 8bit wide | ||
43 | * +---------+ | ||
44 | * 0| | | ||
45 | * :| | 0x00-0x87 | ||
46 | * ;| | | ||
47 | * 17| | | ||
48 | * +---------+ | ||
49 | */ | ||
50 | static uint8_t matrix[MATRIX_ROWS]; | ||
51 | #define ROW(code) (code>>3) | ||
52 | #define COL(code) (code&0x07) | ||
53 | |||
54 | |||
55 | __attribute__ ((weak)) | ||
56 | void matrix_init_user(void) { | ||
57 | } | ||
58 | |||
59 | void matrix_init(void) | ||
60 | { | ||
61 | debug_enable = true; | ||
62 | //debug_matrix = true; | ||
63 | //debug_keyboard = true; | ||
64 | //debug_mouse = false; | ||
65 | |||
66 | ps2_host_init(); | ||
67 | |||
68 | // initialize matrix state: all keys off | ||
69 | for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; | ||
70 | |||
71 | matrix_init_user(); | ||
72 | return; | ||
73 | } | ||
74 | |||
75 | uint8_t matrix_scan(void) | ||
76 | { | ||
77 | |||
78 | // scan code reading states | ||
79 | static enum { | ||
80 | RESET, | ||
81 | RESET_RESPONSE, | ||
82 | KBD_ID0, | ||
83 | KBD_ID1, | ||
84 | CONFIG, | ||
85 | READY, | ||
86 | F0, | ||
87 | } state = RESET; | ||
88 | |||
89 | uint8_t code; | ||
90 | if ((code = ps2_host_recv())) { | ||
91 | debug("r"); debug_hex(code); debug(" "); | ||
92 | } | ||
93 | |||
94 | switch (state) { | ||
95 | case RESET: | ||
96 | debug("wFF "); | ||
97 | if (ps2_host_send(0xFF) == 0xFA) { | ||
98 | debug("[ack]\nRESET_RESPONSE: "); | ||
99 | state = RESET_RESPONSE; | ||
100 | } | ||
101 | break; | ||
102 | case RESET_RESPONSE: | ||
103 | if (code == 0xAA) { | ||
104 | debug("[ok]\nKBD_ID: "); | ||
105 | state = KBD_ID0; | ||
106 | } else if (code) { | ||
107 | debug("err\nRESET: "); | ||
108 | state = RESET; | ||
109 | } | ||
110 | break; | ||
111 | // after reset receive keyboard ID(2 bytes) | ||
112 | case KBD_ID0: | ||
113 | if (code) { | ||
114 | state = KBD_ID1; | ||
115 | } | ||
116 | break; | ||
117 | case KBD_ID1: | ||
118 | if (code) { | ||
119 | debug("\nCONFIG: "); | ||
120 | state = CONFIG; | ||
121 | } | ||
122 | break; | ||
123 | case CONFIG: | ||
124 | debug("wF8 "); | ||
125 | if (ps2_host_send(0xF8) == 0xFA) { | ||
126 | debug("[ack]\nREADY\n"); | ||
127 | state = READY; | ||
128 | } | ||
129 | break; | ||
130 | case READY: | ||
131 | switch (code) { | ||
132 | case 0x00: | ||
133 | break; | ||
134 | case 0xF0: | ||
135 | state = F0; | ||
136 | debug(" "); | ||
137 | break; | ||
138 | default: // normal key make | ||
139 | if (code < 0x88) { | ||
140 | matrix_make(code); | ||
141 | } else { | ||
142 | debug("unexpected scan code at READY: "); debug_hex(code); debug("\n"); | ||
143 | } | ||
144 | state = READY; | ||
145 | debug("\n"); | ||
146 | } | ||
147 | break; | ||
148 | case F0: // Break code | ||
149 | switch (code) { | ||
150 | case 0x00: | ||
151 | break; | ||
152 | default: | ||
153 | if (code < 0x88) { | ||
154 | matrix_break(code); | ||
155 | } else { | ||
156 | debug("unexpected scan code at F0: "); debug_hex(code); debug("\n"); | ||
157 | } | ||
158 | state = READY; | ||
159 | debug("\n"); | ||
160 | } | ||
161 | break; | ||
162 | } | ||
163 | return 1; | ||
164 | } | ||
165 | |||
166 | inline | ||
167 | uint8_t matrix_get_row(uint8_t row) | ||
168 | { | ||
169 | return matrix[row]; | ||
170 | } | ||
171 | |||
172 | inline | ||
173 | static void matrix_make(uint8_t code) | ||
174 | { | ||
175 | if (!matrix_is_on(ROW(code), COL(code))) { | ||
176 | matrix[ROW(code)] |= 1<<COL(code); | ||
177 | } | ||
178 | } | ||
179 | |||
180 | inline | ||
181 | static void matrix_break(uint8_t code) | ||
182 | { | ||
183 | if (matrix_is_on(ROW(code), COL(code))) { | ||
184 | matrix[ROW(code)] &= ~(1<<COL(code)); | ||
185 | } | ||
186 | } | ||
187 | |||
188 | bool matrix_is_on(uint8_t row, uint8_t col) | ||
189 | { | ||
190 | return (matrix_get_row(row) & (1<<col)); | ||
191 | } | ||
192 | |||
193 | void matrix_print(void) | ||
194 | { | ||
195 | #if (MATRIX_COLS <= 8) | ||
196 | print("r/c 01234567\n"); | ||
197 | #elif (MATRIX_COLS <= 16) | ||
198 | print("r/c 0123456789ABCDEF\n"); | ||
199 | #elif (MATRIX_COLS <= 32) | ||
200 | print("r/c 0123456789ABCDEF0123456789ABCDEF\n"); | ||
201 | #endif | ||
202 | |||
203 | for (uint8_t row = 0; row < MATRIX_ROWS; row++) { | ||
204 | |||
205 | #if (MATRIX_COLS <= 8) | ||
206 | xprintf("%02X: %08b%s\n", row, bitrev(matrix_get_row(row)), | ||
207 | #elif (MATRIX_COLS <= 16) | ||
208 | xprintf("%02X: %016b%s\n", row, bitrev16(matrix_get_row(row)), | ||
209 | #elif (MATRIX_COLS <= 32) | ||
210 | xprintf("%02X: %032b%s\n", row, bitrev32(matrix_get_row(row)), | ||
211 | #endif | ||
212 | #ifdef MATRIX_HAS_GHOST | ||
213 | matrix_has_ghost_in_row(row) ? " <ghost" : "" | ||
214 | #else | ||
215 | "" | ||
216 | #endif | ||
217 | ); | ||
218 | } | ||
219 | } | ||
220 | |||
221 | #ifdef MATRIX_HAS_GHOST | ||
222 | __attribute__ ((weak)) | ||
223 | bool matrix_has_ghost_in_row(uint8_t row) | ||
224 | { | ||
225 | matrix_row_t matrix_row = matrix_get_row(row); | ||
226 | // No ghost exists when less than 2 keys are down on the row | ||
227 | if (((matrix_row - 1) & matrix_row) == 0) | ||
228 | return false; | ||
229 | |||
230 | // Ghost occurs when the row shares column line with other row | ||
231 | for (uint8_t i=0; i < MATRIX_ROWS; i++) { | ||
232 | if (i != row && (matrix_get_row(i) & matrix_row)) | ||
233 | return true; | ||
234 | } | ||
235 | return false; | ||
236 | } | ||
237 | #endif | ||
diff --git a/keyboards/converter/ibm_terminal/readme.md b/keyboards/converter/ibm_terminal/readme.md new file mode 100644 index 000000000..b781b0468 --- /dev/null +++ b/keyboards/converter/ibm_terminal/readme.md | |||
@@ -0,0 +1,39 @@ | |||
1 | # Keyboard converter for IBM terminal keyboard | ||
2 | |||
3 | This is a port of TMK's converter/terminal_usb to QMK. | ||
4 | |||
5 | It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy. | ||
6 | I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys). | ||
7 | |||
8 | Source code: https://github.com/qmk/qmk_firmware.git | ||
9 | Article: http://geekhack.org/index.php?topic=27272.0 | ||
10 | |||
11 | |||
12 | ## Connection | ||
13 | |||
14 | Keyboard | ATMega32U4 | ||
15 | :------- | :--------- | ||
16 | Data | PD2 | ||
17 | Clock | PD5 | ||
18 | |||
19 | And VCC and GND, of course. See Resource section for keyboard connector pin assign. | ||
20 | |||
21 | |||
22 | ## Build | ||
23 | |||
24 | ``` | ||
25 | git clone https://github.com/qmk/qmk_firmware.git | ||
26 | cd qmk_firmware | ||
27 | make converter/ibm_terminal:default | ||
28 | ``` | ||
29 | |||
30 | ## Resource | ||
31 | |||
32 | - Soarer's Converter: http://geekhack.org/index.php?topic=17458.0 | ||
33 | - 102keys(1392595): http://geekhack.org/index.php?topic=10737.0 | ||
34 | - 122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html | ||
35 | - KbdBabel: http://www.kbdbabel.org/ | ||
36 | - RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png | ||
37 | - DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png | ||
38 | - WinAVR: http://winavr.sourceforge.net/ | ||
39 | |||
diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk new file mode 100644 index 000000000..277e82826 --- /dev/null +++ b/keyboards/converter/ibm_terminal/rules.mk | |||
@@ -0,0 +1,22 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | BOOTLOADER = atmel-dfu | ||
6 | |||
7 | # Build Options | ||
8 | # change yes to no to disable | ||
9 | # | ||
10 | BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite | ||
11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
13 | CONSOLE_ENABLE = no # Console for debug | ||
14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
15 | NKRO_ENABLE = yes # Enable N-Key Rollover | ||
16 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
17 | AUDIO_ENABLE = no # Audio output | ||
18 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. | ||
19 | PS2_USE_USART = yes | ||
20 | CUSTOM_MATRIX = yes | ||
21 | |||
22 | SRC = matrix.c led.c | ||