diff options
50 files changed, 2003 insertions, 245 deletions
diff --git a/keyboards/converter/Makefile b/keyboards/converter/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/converter/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/converter/converter.c b/keyboards/converter/converter.c new file mode 100644 index 000000000..aa4bef63a --- /dev/null +++ b/keyboards/converter/converter.c | |||
| @@ -0,0 +1 @@ | |||
| #include "converter.h" \ No newline at end of file | |||
diff --git a/keyboards/converter/converter.h b/keyboards/converter/converter.h new file mode 100644 index 000000000..7a4a4835e --- /dev/null +++ b/keyboards/converter/converter.h | |||
| @@ -0,0 +1 @@ | |||
| #include "quantum.h" \ No newline at end of file | |||
diff --git a/keyboards/converter/ibm_terminal/Makefile b/keyboards/converter/ibm_terminal/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/converter/ibm_terminal/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/converter/ibm_terminal/README b/keyboards/converter/ibm_terminal/README new file mode 100644 index 000000000..6b7aff2c8 --- /dev/null +++ b/keyboards/converter/ibm_terminal/README | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | Keyboard converter for IBM terminal keyboard | ||
| 2 | ============================================ | ||
| 3 | |||
| 4 | This is a port of TMK's converter/terminal_usb to QMK. | ||
| 5 | |||
| 6 | It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy. | ||
| 7 | I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys). | ||
| 8 | |||
| 9 | Source code: https://github.com/tmk/tmk_keyboard | ||
| 10 | Article: http://geekhack.org/index.php?topic=27272.0 | ||
| 11 | |||
| 12 | |||
| 13 | CONNECTION | ||
| 14 | ---------- | ||
| 15 | Keyboard ATMega32U4 | ||
| 16 | ---------------------- | ||
| 17 | Data: PD2 | ||
| 18 | Clock: PD5 | ||
| 19 | |||
| 20 | And VCC and GND, of course. See RESOURCE for keyboard connector pin assign. | ||
| 21 | |||
| 22 | |||
| 23 | BUILD | ||
| 24 | ----- | ||
| 25 | $ git clone https://github.com/tmk/tmk_keyboard.git | ||
| 26 | $ cd converter/terminal_usb | ||
| 27 | $ make | ||
| 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 | |||
| 40 | EOF | ||
diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h new file mode 100644 index 000000000..4dd85f698 --- /dev/null +++ b/keyboards/converter/ibm_terminal/config.h | |||
| @@ -0,0 +1,138 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.net> | ||
| 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 | #ifndef CONFIG_H | ||
| 20 | #define CONFIG_H | ||
| 21 | |||
| 22 | |||
| 23 | #define VENDOR_ID 0xFEED | ||
| 24 | #define PRODUCT_ID 0x6535 | ||
| 25 | #define DEVICE_VER 0x0100 | ||
| 26 | #define MANUFACTURER QMK | ||
| 27 | #define PRODUCT IBM Terminal Keyboard | ||
| 28 | #define DESCRIPTION USB converter for IBM Terminal Keyboard | ||
| 29 | |||
| 30 | |||
| 31 | /* matrix size */ | ||
| 32 | #define MATRIX_ROWS 17 // keycode bit: 3-0 | ||
| 33 | #define MATRIX_COLS 8 // keycode bit: 6-4 | ||
| 34 | |||
| 35 | |||
| 36 | /* legacy keymap support */ | ||
| 37 | #define USE_LEGACY_KEYMAP | ||
| 38 | |||
| 39 | |||
| 40 | /* key combination for command */ | ||
| 41 | #define IS_COMMAND() ( \ | ||
| 42 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ | ||
| 43 | ) | ||
| 44 | |||
| 45 | |||
| 46 | /* | ||
| 47 | * PS/2 USART configuration for ATMega32U4 | ||
| 48 | */ | ||
| 49 | #ifdef PS2_USE_USART | ||
| 50 | /* XCK for clock line */ | ||
| 51 | #define PS2_CLOCK_PORT PORTD | ||
| 52 | #define PS2_CLOCK_PIN PIND | ||
| 53 | #define PS2_CLOCK_DDR DDRD | ||
| 54 | #define PS2_CLOCK_BIT 5 | ||
| 55 | /* RXD for data line */ | ||
| 56 | #define PS2_DATA_PORT PORTD | ||
| 57 | #define PS2_DATA_PIN PIND | ||
| 58 | #define PS2_DATA_DDR DDRD | ||
| 59 | #define PS2_DATA_BIT 2 | ||
| 60 | |||
| 61 | /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ | ||
| 62 | /* set DDR of CLOCK as input to be slave */ | ||
| 63 | #define PS2_USART_INIT() do { \ | ||
| 64 | PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \ | ||
| 65 | PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \ | ||
| 66 | UCSR1C = ((1 << UMSEL10) | \ | ||
| 67 | (3 << UPM10) | \ | ||
| 68 | (0 << USBS1) | \ | ||
| 69 | (3 << UCSZ10) | \ | ||
| 70 | (0 << UCPOL1)); \ | ||
| 71 | UCSR1A = 0; \ | ||
| 72 | UBRR1H = 0; \ | ||
| 73 | UBRR1L = 0; \ | ||
| 74 | } while (0) | ||
| 75 | #define PS2_USART_RX_INT_ON() do { \ | ||
| 76 | UCSR1B = ((1 << RXCIE1) | \ | ||
| 77 | (1 << RXEN1)); \ | ||
| 78 | } while (0) | ||
| 79 | #define PS2_USART_RX_POLL_ON() do { \ | ||
| 80 | UCSR1B = (1 << RXEN1); \ | ||
| 81 | } while (0) | ||
| 82 | #define PS2_USART_OFF() do { \ | ||
| 83 | UCSR1C = 0; \ | ||
| 84 | UCSR1B &= ~((1 << RXEN1) | \ | ||
| 85 | (1 << TXEN1)); \ | ||
| 86 | } while (0) | ||
| 87 | #define PS2_USART_RX_READY (UCSR1A & (1<<RXC1)) | ||
| 88 | #define PS2_USART_RX_DATA UDR1 | ||
| 89 | #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1))) | ||
| 90 | #define PS2_USART_RX_VECT USART1_RX_vect | ||
| 91 | #endif | ||
| 92 | |||
| 93 | |||
| 94 | /* | ||
| 95 | * PS/2 Interrupt configuration | ||
| 96 | */ | ||
| 97 | #ifdef PS2_USE_INT | ||
| 98 | /* uses INT1 for clock line(ATMega32U4) */ | ||
| 99 | #define PS2_CLOCK_PORT PORTD | ||
| 100 | #define PS2_CLOCK_PIN PIND | ||
| 101 | #define PS2_CLOCK_DDR DDRD | ||
| 102 | #define PS2_CLOCK_BIT 1 | ||
| 103 | |||
| 104 | #define PS2_DATA_PORT PORTD | ||
| 105 | #define PS2_DATA_PIN PIND | ||
| 106 | #define PS2_DATA_DDR DDRD | ||
| 107 | #define PS2_DATA_BIT 0 | ||
| 108 | |||
| 109 | #define PS2_INT_INIT() do { \ | ||
| 110 | EICRA |= ((1<<ISC11) | \ | ||
| 111 | (0<<ISC10)); \ | ||
| 112 | } while (0) | ||
| 113 | #define PS2_INT_ON() do { \ | ||
| 114 | EIMSK |= (1<<INT1); \ | ||
| 115 | } while (0) | ||
| 116 | #define PS2_INT_OFF() do { \ | ||
| 117 | EIMSK &= ~(1<<INT1); \ | ||
| 118 | } while (0) | ||
| 119 | #define PS2_INT_VECT INT1_vect | ||
| 120 | #endif | ||
| 121 | |||
| 122 | |||
| 123 | /* | ||
| 124 | * PS/2 Busywait configuration | ||
| 125 | */ | ||
| 126 | #ifdef PS2_USE_BUSYWAIT | ||
| 127 | #define PS2_CLOCK_PORT PORTD | ||
| 128 | #define PS2_CLOCK_PIN PIND | ||
| 129 | #define PS2_CLOCK_DDR DDRD | ||
| 130 | #define PS2_CLOCK_BIT 1 | ||
| 131 | |||
| 132 | #define PS2_DATA_PORT PORTD | ||
| 133 | #define PS2_DATA_PIN PIND | ||
| 134 | #define PS2_DATA_DDR DDRD | ||
| 135 | #define PS2_DATA_BIT 0 | ||
| 136 | #endif | ||
| 137 | |||
| 138 | #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..17296864a --- /dev/null +++ b/keyboards/converter/ibm_terminal/ibm_terminal.c | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #include "ibm_terminal.h" | ||
| 2 | |||
| 3 | // void matrix_init_kb(void) { | ||
| 4 | |||
| 5 | // matrix_init_user(); | ||
| 6 | // } \ No newline at end of file | ||
diff --git a/keyboards/converter/ibm_terminal/ibm_terminal.h b/keyboards/converter/ibm_terminal/ibm_terminal.h new file mode 100644 index 000000000..c6468349c --- /dev/null +++ b/keyboards/converter/ibm_terminal/ibm_terminal.h | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | #ifndef IBM_TERMINAL_H | ||
| 2 | #define IBM_TERMINAL_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | void matrix_init_user(void); | ||
| 7 | |||
| 8 | /* | ||
| 9 | * IBM Terminal keyboard 6110345(122keys)/1392595(102keys) | ||
| 10 | * http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M | ||
| 11 | * http://www.seasip.info/VintagePC/ibm_1391406.html | ||
| 12 | * | ||
| 13 | * Keymap array: | ||
| 14 | * 8 bytes | ||
| 15 | * +---------+ | ||
| 16 | * 0| | | ||
| 17 | * :| | 0x00-0x87 | ||
| 18 | * ;| | | ||
| 19 | * 17| | | ||
| 20 | * +---------+ | ||
| 21 | */ | ||
| 22 | #define KEYMAP( \ | ||
| 23 | K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F, \ | ||
| 24 | K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, \ | ||
| 25 | \ | ||
| 26 | K05,K06, K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ | ||
| 27 | K04,K0C, K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B, K5C, K64,K65,K6D, K6C,K75,K7D,K7C, \ | ||
| 28 | K03,K0B, K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K53,K5A, K63, K6B,K73,K74,K7B, \ | ||
| 29 | K83,K0A, K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K51,K59, K61,K62,K6A, K69,K72,K7A,K79, \ | ||
| 30 | K01,K09, K11, K19, K29, K39, K58, K60, K68,K70,K71,K78 \ | ||
| 31 | ) { \ | ||
| 32 | { KC_NO, K01, KC_NO, K03, K04, K05, K06, K07 }, \ | ||
| 33 | { K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, \ | ||
| 34 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
| 35 | { K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ | ||
| 36 | { K20, K21, K22, K23, K24, K25, K26, K27 }, \ | ||
| 37 | { K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ | ||
| 38 | { K30, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
| 39 | { K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ | ||
| 40 | { K40, K41, K42, K43, K44, K45, K46, K47 }, \ | ||
| 41 | { K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ | ||
| 42 | { K50, K51, K52, K53, K54, K55, K56, K57 }, \ | ||
| 43 | { K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \ | ||
| 44 | { K60, K61, K62, K63, K64, K65, K66, K67 }, \ | ||
| 45 | { K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ | ||
| 46 | { K70, K71, K72, K73, K74, K75, K76, K77 }, \ | ||
| 47 | { K78, K79, K7A, K7B, K7C, K7D, K7E, KC_NO }, \ | ||
| 48 | { KC_NO, KC_NO, KC_NO, K83, K84, KC_NO, KC_NO, KC_NO,}, \ | ||
| 49 | } | ||
| 50 | |||
| 51 | /* | ||
| 52 | * IBM Terminal keyboard 1399625, 101-key | ||
| 53 | */ | ||
| 54 | #define KEYMAP_101( \ | ||
| 55 | K08, K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E, K57,K5F,K62, \ | ||
| 56 | \ | ||
| 57 | K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, K67,K6E,K6F, K76,K77,K7E,K84, \ | ||
| 58 | K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C, K64,K65,K6D, K6C,K75,K7D, \ | ||
| 59 | K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52, K5A, K6B,K73,K74,K7C, \ | ||
| 60 | K12, K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A, K59, K63, K69,K72,K7A, \ | ||
| 61 | K11, K19, K29, K39, K58, K61,K60,K6A, K70, K71,K79 \ | ||
| 62 | ) { \ | ||
| 63 | { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K07 }, \ | ||
| 64 | { K08, KC_NO, KC_NO, KC_NO, KC_NO, K0D, K0E, K0F }, \ | ||
| 65 | { KC_NO, K11, K12, KC_NO, K14, K15, K16, K17 }, \ | ||
| 66 | { KC_NO, K19, K1A, K1B, K1C, K1D, K1E, K1F }, \ | ||
| 67 | { KC_NO, K21, K22, K23, K24, K25, K26, K27 }, \ | ||
| 68 | { KC_NO, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ | ||
| 69 | { KC_NO, K31, K32, K33, K34, K35, K36, K37 }, \ | ||
| 70 | { KC_NO, K39, K3A, K3B, K3C, K3D, K3E, K3F }, \ | ||
| 71 | { KC_NO, K41, K42, K43, K44, K45, K46, K47 }, \ | ||
| 72 | { KC_NO, K49, K4A, K4B, K4C, K4D, K4E, K4F }, \ | ||
| 73 | { KC_NO, KC_NO, K52, KC_NO, K54, K55, K56, K57 }, \ | ||
| 74 | { K58, K59, K5A, K5B, K5C, KC_NO, K5E, K5F }, \ | ||
| 75 | { K60, K61, K62, K63, K64, K65, K66, K67 }, \ | ||
| 76 | { KC_NO, K69, K6A, K6B, K6C, K6D, K6E, K6F }, \ | ||
| 77 | { K70, K71, K72, K73, K74, K75, K76, K77 }, \ | ||
| 78 | { KC_NO, K79, K7A, KC_NO, K7C, K7D, K7E, KC_NO }, \ | ||
| 79 | { KC_NO, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KC_NO,}, \ | ||
| 80 | } | ||
| 81 | |||
| 82 | #endif \ No newline at end of file | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/default/Makefile b/keyboards/converter/ibm_terminal/keymaps/default/Makefile new file mode 100644 index 000000000..9ec246494 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/default/Makefile | |||
| @@ -0,0 +1,27 @@ | |||
| 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 # Virtual DIP switch configuration(+1000) | ||
| 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. Do not enable this with audio at the same time. | ||
| 18 | PS2_USE_USART ?= yes | ||
| 19 | API_SYSEX_ENABLE ?= no | ||
| 20 | |||
| 21 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 22 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 23 | |||
| 24 | ifndef QUANTUM_DIR | ||
| 25 | include ../../../../../Makefile | ||
| 26 | endif | ||
| 27 | |||
diff --git a/keyboards/converter/ibm_terminal/keymaps/default/config.h b/keyboards/converter/ibm_terminal/keymaps/default/config.h new file mode 100644 index 000000000..7fa3bf328 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/default/config.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | #endif | ||
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..2beb51106 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/default/keymap.c | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 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 "keycode.h" | ||
| 21 | #include "print.h" | ||
| 22 | #include "debug.h" | ||
| 23 | #include "util.h" | ||
| 24 | #include "ibm_terminal.h" | ||
| 25 | |||
| 26 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 27 | // Layer 0 | ||
| 28 | |||
| 29 | KEYMAP( | ||
| 30 | KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, | ||
| 31 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 32 | |||
| 33 | 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, | ||
| 34 | 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, | ||
| 35 | 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, | ||
| 36 | 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, | ||
| 37 | KC_RGUI,KC_LGUI, KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, KC_GRV, KC_DOWN, KC_NO, KC_P0, KC_PDOT,KC_NO | ||
| 38 | ), | ||
| 39 | |||
| 40 | /* 101-key keymaps | ||
| 41 | */ | ||
| 42 | /* 0: default | ||
| 43 | * ,---. ,---------------. ,---------------. ,---------------. ,-----------. | ||
| 44 | * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| | ||
| 45 | * `---' `---------------' `---------------' `---------------' `-----------' | ||
| 46 | * ,-----------------------------------------------------------. ,-----------. ,---------------. | ||
| 47 | * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backspa| |Ins|Hom|PgU| |NmL| /| *| -| | ||
| 48 | * |-----------------------------------------------------------| |-----------| |---------------| | ||
| 49 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| | 7| 8| 9| | | ||
| 50 | * |-----------------------------------------------------------| `-----------' |-----------| +| | ||
| 51 | * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Return | | 4| 5| 6| | | ||
| 52 | * |-----------------------------------------------------------| ,---. |---------------| | ||
| 53 | * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | |Up | | 1| 2| 3| | | ||
| 54 | * |-----------------------------------------------------------| ,-----------. |-----------|Ent| | ||
| 55 | * |Ctrl| |Alt | Space |Alt | |Ctrl| |Lef|Dow|Rig| | 0| .| | | ||
| 56 | * `----' `---------------------------------------' `----' `-----------' `---------------' | ||
| 57 | */ | ||
| 58 | /* | ||
| 59 | KEYMAP_101( | ||
| 60 | 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, | ||
| 61 | |||
| 62 | 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, | ||
| 63 | 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, | ||
| 64 | 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, | ||
| 65 | 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, | ||
| 66 | KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT, KC_P0, KC_PDOT,KC_PENT | ||
| 67 | ), | ||
| 68 | */ | ||
| 69 | }; | ||
diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/Makefile b/keyboards/converter/ibm_terminal/keymaps/priyadi/Makefile new file mode 100644 index 000000000..9ec246494 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/Makefile | |||
| @@ -0,0 +1,27 @@ | |||
| 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 # Virtual DIP switch configuration(+1000) | ||
| 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. Do not enable this with audio at the same time. | ||
| 18 | PS2_USE_USART ?= yes | ||
| 19 | API_SYSEX_ENABLE ?= no | ||
| 20 | |||
| 21 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 22 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 23 | |||
| 24 | ifndef QUANTUM_DIR | ||
| 25 | include ../../../../../Makefile | ||
| 26 | endif | ||
| 27 | |||
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..7fa3bf328 --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/config.h | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | #endif | ||
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..592f7654b --- /dev/null +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c | |||
| @@ -0,0 +1,312 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2016 Priyadi Iman Nurcahyo <priyadi@priyadi.net> | ||
| 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 "keycode.h" | ||
| 19 | #include "print.h" | ||
| 20 | #include "debug.h" | ||
| 21 | #include "util.h" | ||
| 22 | #include "ibm_terminal.h" | ||
| 23 | #include "action_layer.h" | ||
| 24 | |||
| 25 | // Fillers to make layering clearer | ||
| 26 | |||
| 27 | #define _______ KC_TRNS | ||
| 28 | #define XXXXXXX KC_NO | ||
| 29 | |||
| 30 | enum layers { | ||
| 31 | QWE, // qwerty | ||
| 32 | COL, // colemak | ||
| 33 | WOR, // workman | ||
| 34 | DVO, // dvorak | ||
| 35 | |||
| 36 | MOU, // mouse keys | ||
| 37 | EMO, // emoji | ||
| 38 | SYS, // system | ||
| 39 | }; | ||
| 40 | |||
| 41 | enum keycodes { | ||
| 42 | // default layout switcher | ||
| 43 | LAY_QWE = SAFE_RANGE, | ||
| 44 | LAY_COL, | ||
| 45 | LAY_WOR, | ||
| 46 | LAY_DVO, | ||
| 47 | |||
| 48 | // layer switchers | ||
| 49 | LYR_SYS, | ||
| 50 | LYR_EMO, | ||
| 51 | |||
| 52 | // os switchers | ||
| 53 | OS_LIN, | ||
| 54 | OS_WIN, | ||
| 55 | OS_MAC, | ||
| 56 | }; | ||
| 57 | |||
| 58 | // unicode map | ||
| 59 | |||
| 60 | enum unicode_name { | ||
| 61 | GRIN, // grinning face 😊 | ||
| 62 | TJOY, // tears of joy 😂 | ||
| 63 | SMILE, // grining face with smiling eyes 😁 | ||
| 64 | HEART, // heart ❤ | ||
| 65 | EYERT, // smiling face with heart shaped eyes 😍 | ||
| 66 | CRY, // crying face 😭 | ||
| 67 | SMEYE, // smiling face with smiling eyes 😊 | ||
| 68 | UNAMU, // unamused 😒 | ||
| 69 | KISS, // kiss 😘 | ||
| 70 | HART2, // two hearts 💕 | ||
| 71 | WEARY, // weary 😩 | ||
| 72 | OKHND, // ok hand sign 👌 | ||
| 73 | PENSV, // pensive 😔 | ||
| 74 | SMIRK, // smirk 😏 | ||
| 75 | RECYC, // recycle ♻ | ||
| 76 | WINK, // wink 😉 | ||
| 77 | THMUP, // thumb up 👍 | ||
| 78 | THMDN, // thumb down 👎 | ||
| 79 | PRAY, // pray 🙏 | ||
| 80 | PHEW, // relieved 😌 | ||
| 81 | MUSIC, // musical notes | ||
| 82 | FLUSH, // flushed 😳 | ||
| 83 | CELEB, // celebration 🙌 | ||
| 84 | CRY2, // crying face 😢 | ||
| 85 | COOL, // smile with sunglasses 😎 | ||
| 86 | NOEVS, // see no evil | ||
| 87 | NOEVH, // hear no evil | ||
| 88 | NOEVK, // speak no evil | ||
| 89 | POO, // pile of poo | ||
| 90 | EYES, // eyes | ||
| 91 | VIC, // victory hand | ||
| 92 | BHART, // broken heart | ||
| 93 | SLEEP, // sleeping face | ||
| 94 | SMIL2, // smiling face with open mouth & sweat | ||
| 95 | HUNRD, // 100 | ||
| 96 | CONFU, // confused | ||
| 97 | TONGU, // face with tongue & winking eye | ||
| 98 | DISAP, // disappointed | ||
| 99 | YUMMY, // face savoring delicious food | ||
| 100 | CLAP, // hand clapping | ||
| 101 | FEAR, // face screaming in fear | ||
| 102 | HORNS, // smiling face with horns | ||
| 103 | HALO, // smiling face with halo | ||
| 104 | BYE, // waving hand | ||
| 105 | SUN, // sun | ||
| 106 | MOON, // moon | ||
| 107 | SKULL, // skull | ||
| 108 | }; | ||
| 109 | |||
| 110 | const uint32_t PROGMEM unicode_map[] = { | ||
| 111 | [GRIN] = 0x1F600, | ||
| 112 | [TJOY] = 0x1F602, | ||
| 113 | [SMILE] = 0x1F601, | ||
| 114 | [HEART] = 0x2764, | ||
| 115 | [EYERT] = 0x1f60d, | ||
| 116 | [CRY] = 0x1f62d, | ||
| 117 | [SMEYE] = 0x1F60A, | ||
| 118 | [UNAMU] = 0x1F612, | ||
| 119 | [KISS] = 0x1F618, | ||
| 120 | [HART2] = 0x1F495, | ||
| 121 | [WEARY] = 0x1F629, | ||
| 122 | [OKHND] = 0x1F44C, | ||
| 123 | [PENSV] = 0x1F614, | ||
| 124 | [SMIRK] = 0x1F60F, | ||
| 125 | [RECYC] = 0x267B, | ||
| 126 | [WINK] = 0x1F609, | ||
| 127 | [THMUP] = 0x1F44D, | ||
| 128 | [THMDN] = 0x1F44E, | ||
| 129 | [PRAY] = 0x1F64F, | ||
| 130 | [PHEW] = 0x1F60C, | ||
| 131 | [MUSIC] = 0x1F3B6, | ||
| 132 | [FLUSH] = 0x1F633, | ||
| 133 | [CELEB] = 0x1F64C, | ||
| 134 | [CRY2] = 0x1F622, | ||
| 135 | [COOL] = 0x1F60E, | ||
| 136 | [NOEVS] = 0x1F648, | ||
| 137 | [NOEVH] = 0x1F649, | ||
| 138 | [NOEVK] = 0x1F64A, | ||
| 139 | [POO] = 0x1F4A9, | ||
| 140 | [EYES] = 0x1F440, | ||
| 141 | [VIC] = 0x270C, | ||
| 142 | [BHART] = 0x1F494, | ||
| 143 | [SLEEP] = 0x1F634, | ||
| 144 | [SMIL2] = 0x1F605, | ||
| 145 | [HUNRD] = 0x1F4AF, | ||
| 146 | [CONFU] = 0x1F615, | ||
| 147 | [TONGU] = 0x1F61C, | ||
| 148 | [DISAP] = 0x1F61E, | ||
| 149 | [YUMMY] = 0x1F60B, | ||
| 150 | [CLAP] = 0x1F44F, | ||
| 151 | [FEAR] = 0x1F631, | ||
| 152 | [HORNS] = 0x1F608, | ||
| 153 | [HALO] = 0x1F607, | ||
| 154 | [BYE] = 0x1F44B, | ||
| 155 | [SUN] = 0x2600, | ||
| 156 | [MOON] = 0x1F314, | ||
| 157 | [SKULL] = 0x1F480, | ||
| 158 | }; | ||
| 159 | |||
| 160 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 161 | /* qwerty */ | ||
| 162 | [QWE] = KEYMAP( | ||
| 163 | KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_PSCR, KC_SLCK, KC_PAUS, | ||
| 164 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, | ||
| 165 | |||
| 166 | 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, | ||
| 167 | 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, | ||
| 168 | 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, | ||
| 169 | 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, | ||
| 170 | KC_LGUI, KC_APP, KC_LCTL, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_DOWN, XXXXXXX, KC_P0, KC_PDOT, XXXXXXX | ||
| 171 | ), | ||
| 172 | |||
| 173 | /* colemak */ | ||
| 174 | [COL] = KEYMAP( | ||
| 175 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 176 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 177 | |||
| 178 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 179 | _______, _______, _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 180 | _______, _______, _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
| 181 | _______, _______, _______, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 182 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 183 | ), | ||
| 184 | |||
| 185 | /* workman */ | ||
| 186 | [WOR] = KEYMAP( | ||
| 187 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 188 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 189 | |||
| 190 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 191 | _______, _______, _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 192 | _______, _______, _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, _______, _______, _______, _______, _______, _______, | ||
| 193 | _______, _______, _______, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 194 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 195 | ), | ||
| 196 | |||
| 197 | /* dvorak */ | ||
| 198 | [DVO] = KEYMAP( | ||
| 199 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 200 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 201 | |||
| 202 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 203 | _______, _______, _______, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 204 | _______, _______, _______, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, _______, _______, _______, _______, _______, _______, _______, | ||
| 205 | _______, _______, _______, _______, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 206 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 207 | ), | ||
| 208 | |||
| 209 | /* system */ | ||
| 210 | [SYS] = KEYMAP( | ||
| 211 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 212 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 213 | |||
| 214 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 215 | _______, _______, _______, LAY_QWE, OS_WIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 216 | _______, _______, _______, _______, _______, LAY_DVO, _______, _______, _______, _______, LAY_WOR, OS_LIN, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 217 | _______, _______, _______, _______, _______, _______, LAY_COL, _______, _______, _______, OS_MAC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 218 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 219 | ), | ||
| 220 | |||
| 221 | /* mouse keys */ | ||
| 222 | [MOU] = KEYMAP( | ||
| 223 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 224 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 225 | |||
| 226 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 227 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 228 | XXXXXXX, KC_BTN4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_U, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 229 | 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, | ||
| 230 | KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MS_D, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 231 | ), | ||
| 232 | |||
| 233 | /* emoji */ | ||
| 234 | [EMO] = KEYMAP( | ||
| 235 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 236 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 237 | |||
| 238 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
| 239 | 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, | ||
| 240 | 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, | ||
| 241 | 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, | ||
| 242 | XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
| 243 | ), | ||
| 244 | |||
| 245 | /* | ||
| 246 | [XXX] = KEYMAP( | ||
| 247 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 248 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 249 | |||
| 250 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 251 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 252 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 253 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
| 254 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | ||
| 255 | ), | ||
| 256 | */ | ||
| 257 | }; | ||
| 258 | |||
| 259 | void persistant_default_layer_set(uint16_t default_layer) { | ||
| 260 | eeconfig_update_default_layer(default_layer); | ||
| 261 | default_layer_set(default_layer); | ||
| 262 | } | ||
| 263 | |||
| 264 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 265 | switch (keycode) { | ||
| 266 | /* layout switcher */ | ||
| 267 | case LAY_QWE: | ||
| 268 | if (record->event.pressed) { | ||
| 269 | persistant_default_layer_set(1UL<<QWE); | ||
| 270 | } | ||
| 271 | return false; | ||
| 272 | break; | ||
| 273 | case LAY_COL: | ||
| 274 | if (record->event.pressed) { | ||
| 275 | persistant_default_layer_set(1UL<<COL); | ||
| 276 | } | ||
| 277 | return false; | ||
| 278 | break; | ||
| 279 | case LAY_WOR: | ||
| 280 | if (record->event.pressed) { | ||
| 281 | persistant_default_layer_set(1UL<<WOR); | ||
| 282 | } | ||
| 283 | return false; | ||
| 284 | break; | ||
| 285 | case LAY_DVO: | ||
| 286 | if (record->event.pressed) { | ||
| 287 | persistant_default_layer_set(1UL<<DVO); | ||
| 288 | } | ||
| 289 | return false; | ||
| 290 | break; | ||
| 291 | |||
| 292 | /* os switcher */ | ||
| 293 | case OS_LIN: | ||
| 294 | set_unicode_input_mode(UC_LNX); | ||
| 295 | return false; | ||
| 296 | break; | ||
| 297 | case OS_WIN: | ||
| 298 | set_unicode_input_mode(UC_WINC); | ||
| 299 | return false; | ||
| 300 | break; | ||
| 301 | case OS_MAC: | ||
| 302 | set_unicode_input_mode(UC_OSX); | ||
| 303 | return false; | ||
| 304 | break; | ||
| 305 | |||
| 306 | } | ||
| 307 | return true; | ||
| 308 | } | ||
| 309 | |||
| 310 | void matrix_init_user() { | ||
| 311 | set_unicode_input_mode(UC_LNX); | ||
| 312 | } | ||
diff --git a/keyboards/converter/ibm_terminal/led.c b/keyboards/converter/ibm_terminal/led.c new file mode 100644 index 000000000..e448e84ec --- /dev/null +++ b/keyboards/converter/ibm_terminal/led.c | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2011 Jun Wako <wakojun@gmail.com> | ||
| 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..9d717b61f --- /dev/null +++ b/keyboards/converter/ibm_terminal/matrix.c | |||
| @@ -0,0 +1,237 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2011 Jun Wako <wakojun@gmail.com> | ||
| 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 keyboad 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/rules.mk b/keyboards/converter/ibm_terminal/rules.mk new file mode 100644 index 000000000..944d1bcec --- /dev/null +++ b/keyboards/converter/ibm_terminal/rules.mk | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Processor frequency. | ||
| 5 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 6 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 7 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 8 | # automatically to create a 32-bit value in your source code. | ||
| 9 | # | ||
| 10 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 11 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 12 | # does not *change* the processor frequency - it should merely be updated to | ||
| 13 | # reflect the processor speed set externally so that the code can use accurate | ||
| 14 | # software delays. | ||
| 15 | F_CPU = 16000000 | ||
| 16 | |||
| 17 | # | ||
| 18 | # LUFA specific | ||
| 19 | # | ||
| 20 | # Target architecture (see library "Board Types" documentation). | ||
| 21 | ARCH = AVR8 | ||
| 22 | |||
| 23 | # Input clock frequency. | ||
| 24 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 25 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 26 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 27 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 28 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 29 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 30 | # source code. | ||
| 31 | # | ||
| 32 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 33 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 34 | F_USB = $(F_CPU) | ||
| 35 | |||
| 36 | # Interrupt driven control endpoint task(+60) | ||
| 37 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 38 | |||
| 39 | |||
| 40 | # Boot Section Size in *bytes* | ||
| 41 | # Teensy halfKay 512 | ||
| 42 | # Teensy++ halfKay 1024 | ||
| 43 | # Atmel DFU loader 4096 | ||
| 44 | # LUFA bootloader 4096 | ||
| 45 | # USBaspLoader 2048 | ||
| 46 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 47 | |||
| 48 | # Build Options | ||
| 49 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 50 | # the appropriate keymap folder that will get included automatically | ||
| 51 | # | ||
| 52 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 53 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 54 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 55 | CONSOLE_ENABLE ?= no # Console for debug(+400) | ||
| 56 | COMMAND_ENABLE ?= no # Commands for debug and configuration | ||
| 57 | NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 58 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality | ||
| 59 | MIDI_ENABLE ?= no # MIDI controls | ||
| 60 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
| 61 | UNICODE_ENABLE ?= no # Unicode | ||
| 62 | UNICODEMAP_ENABLE ?= yes | ||
| 63 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 64 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 65 | PS2_USE_USART ?= yes | ||
| 66 | API_SYSEX_ENABLE ?= n | ||
| 67 | CUSTOM_MATRIX = yes | ||
| 68 | |||
| 69 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 70 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 71 | |||
| 72 | SRC = matrix.c led.c \ No newline at end of file | ||
diff --git a/keyboards/converter/rules.mk b/keyboards/converter/rules.mk new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/converter/rules.mk | |||
diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index c2750a321..a3dc5bf15 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h | |||
| @@ -56,6 +56,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 56 | /* Set 0 if debouncing isn't needed */ | 56 | /* Set 0 if debouncing isn't needed */ |
| 57 | #define DEBOUNCE 5 | 57 | #define DEBOUNCE 5 |
| 58 | 58 | ||
| 59 | #define USB_MAX_POWER_CONSUMPTION 50 | ||
| 60 | |||
| 59 | /* | 61 | /* |
| 60 | * Feature disable options | 62 | * Feature disable options |
| 61 | * These options are also useful to firmware size reduction. | 63 | * These options are also useful to firmware size reduction. |
diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c index 4eff28085..4477cab31 100644 --- a/keyboards/ergodox/keymaps/default/keymap.c +++ b/keyboards/ergodox/keymaps/default/keymap.c | |||
| @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 22 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | 22 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| |
| 23 | * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | | 23 | * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | |
| 24 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 24 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| 25 | * | BkSp | A | S | D | F | G |------| |------| H |J/Alt | K | L |; / L2|' / Cmd | | 25 | * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | |
| 26 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| | 26 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| |
| 27 | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | | 27 | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | |
| 28 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | 28 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' |
| @@ -49,11 +49,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 49 | KC_HOME, | 49 | KC_HOME, |
| 50 | KC_SPC,KC_BSPC,KC_END, | 50 | KC_SPC,KC_BSPC,KC_END, |
| 51 | // right hand | 51 | // right hand |
| 52 | KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, | 52 | KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, |
| 53 | TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | 53 | TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, |
| 54 | KC_H, ALT_T(KC_J), KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), | 54 | KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), |
| 55 | MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, | 55 | MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, |
| 56 | KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, | 56 | KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, |
| 57 | KC_LALT, CTL_T(KC_ESC), | 57 | KC_LALT, CTL_T(KC_ESC), |
| 58 | KC_PGUP, | 58 | KC_PGUP, |
| 59 | KC_PGDN,KC_TAB, KC_ENT | 59 | KC_PGDN,KC_TAB, KC_ENT |
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile index 1fd6cb9ff..3c65e25e1 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/Makefile +++ b/keyboards/ergodox/keymaps/dvorak_programmer/Makefile | |||
| @@ -5,4 +5,4 @@ FORCE_NKRO ?= yes | |||
| 5 | DEBUG_ENABLE = no | 5 | DEBUG_ENABLE = no |
| 6 | CONSOLE_ENABLE = no | 6 | CONSOLE_ENABLE = no |
| 7 | TAP_DANCE_ENABLE = yes | 7 | TAP_DANCE_ENABLE = yes |
| 8 | MOUSEKEY_ENABLE = no | 8 | MOUSEKEY_ENABLE = yes |
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index a4580fe06..3e4a2545b 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md | |||
| @@ -11,5 +11,19 @@ Layers | |||
| 11 | * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. | 11 | * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. |
| 12 | * KEY_SEL: same as above, but every movement shift-selects. | 12 | * KEY_SEL: same as above, but every movement shift-selects. |
| 13 | * NUMBER: keypad layer. | 13 | * NUMBER: keypad layer. |
| 14 | * SYMBOL: all the symbols as well as brackets at the bottom. | 14 | * SYMBOL: all the symbols. |
| 15 | * BRACKET: special brackets-only layer for programming | ||
| 15 | * SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. | 16 | * SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. |
| 17 | * MOUSE: use mouse keys | ||
| 18 | |||
| 19 | Updates | ||
| 20 | ------- | ||
| 21 | |||
| 22 | 2016/12/10: | ||
| 23 | * toggle for brackets layer is now on left thumb cluster. | ||
| 24 | |||
| 25 | 2016/11/05: | ||
| 26 | * removed brackets anywhere but in brackets layer | ||
| 27 | * added mouse layer back in | ||
| 28 | * put semicolon-newline and end-newline on symbol layer | ||
| 29 | * replaced all HYPR with MEH, added more shortcut keys \ No newline at end of file | ||
diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 5100115a6..f3d02f688 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #define SYMBOL 6 | 13 | #define SYMBOL 6 |
| 14 | #define BRACKETS 7 | 14 | #define BRACKETS 7 |
| 15 | #define SHORTCUTS 8 | 15 | #define SHORTCUTS 8 |
| 16 | #define MOUSE 9 | ||
| 16 | 17 | ||
| 17 | // macros | 18 | // macros |
| 18 | #define MC_COPY_LINE 0 | 19 | #define MC_COPY_LINE 0 |
| @@ -57,13 +58,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 57 | [BASE] = KEYMAP( // layer 0 : default | 58 | [BASE] = KEYMAP( // layer 0 : default |
| 58 | // left hand | 59 | // left hand |
| 59 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, | 60 | KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, |
| 60 | LT(BRACKETS,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), | 61 | LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), |
| 61 | MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, | 62 | MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, |
| 62 | KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), | 63 | KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), |
| 63 | OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), | 64 | OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), |
| 64 | // thumb cluster | 65 | // thumb cluster |
| 65 | RCTL(KC_F), RCTL(KC_S), | 66 | MO(BRACKETS), RCTL(KC_S), |
| 66 | RCTL(KC_DEL), | 67 | RCTL(KC_DEL), |
| 67 | KC_BSPC,RCTL(KC_BSPC),KC_DEL, | 68 | KC_BSPC,RCTL(KC_BSPC),KC_DEL, |
| 68 | // right hand | 69 | // right hand |
| 69 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, | 70 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, |
| @@ -71,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 71 | KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, | 72 | KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, |
| 72 | KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), | 73 | KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), |
| 73 | // lower keys - browser tab control | 74 | // lower keys - browser tab control |
| 74 | RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), RCTL(KC_K), RCTL(KC_W), | 75 | RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), |
| 75 | // thumb cluster | 76 | // thumb cluster |
| 76 | M(SEMICOLON_NEWLINE), M(END_NEWLINE), | 77 | KC_HOME,KC_END, |
| 77 | KC_UP, | 78 | KC_UP, |
| 78 | KC_DOWN,KC_ENT, KC_SPC | 79 | KC_DOWN,KC_ENT, KC_SPC |
| 79 | ), | 80 | ), |
| @@ -96,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 96 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 97 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 97 | RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R), | 98 | RCTL(KC_L), RCTL(KC_W), KC_HOME, KC_UP, KC_END, LALT(KC_D), RCTL(KC_R), |
| 98 | LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT), | 99 | LALT(KC_B), KC_LEFT, KC_DOWN, KC_RIGHT, LALT(KC_F), LALT(KC_DOT), |
| 99 | RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), HYPR(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), | 100 | RCTL(KC_C), RCTL(KC_U), M(SCREEN_COPY_MODE), M(SCREEN_PASTE), MEH(KC_V), RCTL(KC_K), M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), |
| 100 | // bottom row | 101 | // bottom row |
| 101 | M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, | 102 | M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, |
| 102 | // thumb cluster | 103 | // thumb cluster |
| @@ -187,21 +188,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 187 | 188 | ||
| 188 | [SYMBOL] = KEYMAP( | 189 | [SYMBOL] = KEYMAP( |
| 189 | // left hand | 190 | // left hand |
| 190 | KC_NO,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, | 191 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 191 | KC_TRNS,KC_TRNS, M(OPEN_CLOSE_PAREN), KC_LPRN, KC_RPRN, KC_TRNS, KC_TRNS, | 192 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 192 | KC_TRNS,KC_TRNS, M(OPEN_CLOSE_BRACKET), KC_LBRC, KC_RBRC, M(OPEN_CLOSE_DOUBLE_QUOTE), | 193 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 193 | KC_TRNS,M(SEMICOLON_NEWLINE),M(OPEN_CLOSE_CURLY), KC_LCBR, KC_RCBR, M(OPEN_CLOSE_SINGLE_QUOTE),KC_TRNS, | 194 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 194 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | 195 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 195 | KC_TRNS,KC_TRNS, | 196 | KC_TRNS,KC_TRNS, |
| 196 | KC_TRNS, | 197 | KC_TRNS, |
| 197 | KC_TRNS,KC_TRNS,KC_TRNS, | 198 | KC_TRNS,KC_TRNS,KC_TRNS, |
| 198 | // right hand | 199 | // right hand |
| 199 | KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, KC_TRNS, | 200 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 200 | KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS, | 201 | KC_TRNS, KC_PLUS, KC_AMPR, KC_ASTR, KC_GRAVE,KC_TILD, KC_TRNS, |
| 201 | KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS, | 202 | KC_MINS, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_TRNS, |
| 202 | KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS, | 203 | KC_TRNS, KC_EQUAL,KC_EXLM, KC_AT, KC_HASH, KC_TRNS, KC_TRNS, |
| 203 | KC_LBRC, KC_RBRC, TD(TD_BRK_LEFT), TD(TD_BRK_RIGHT), KC_TRNS, | 204 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, |
| 204 | KC_TRNS, KC_TRNS, | 205 | M(SEMICOLON_NEWLINE), M(END_NEWLINE), |
| 205 | KC_TRNS, | 206 | KC_TRNS, |
| 206 | KC_TRNS, KC_TRNS, KC_TRNS | 207 | KC_TRNS, KC_TRNS, KC_TRNS |
| 207 | ), | 208 | ), |
| @@ -229,26 +230,46 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 229 | 230 | ||
| 230 | [SHORTCUTS] = KEYMAP( | 231 | [SHORTCUTS] = KEYMAP( |
| 231 | // left hand | 232 | // left hand |
| 232 | KC_NO, HYPR(KC_F1), HYPR(KC_F2), HYPR(KC_F3), HYPR(KC_F4), HYPR(KC_F5), HYPR(KC_F6), | 233 | KC_NO, MEH(KC_F1), MEH(KC_F2), MEH(KC_F3), MEH(KC_F4), MEH(KC_F5), MEH(KC_F6), |
| 233 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | 234 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 234 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | 235 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 235 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | 236 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 236 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, | 237 | KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, |
| 237 | KC_TRNS,KC_TRNS, | 238 | MEH(KC_0),MEH(KC_1), |
| 238 | KC_TRNS, | 239 | MEH(KC_2), |
| 239 | KC_TRNS,KC_TRNS,KC_TRNS, | 240 | MEH(KC_3),MEH(KC_4),MEH(KC_5), |
| 240 | // right hand | 241 | // right hand |
| 241 | HYPR(KC_F7), HYPR(KC_F8), HYPR(KC_F9), HYPR(KC_F10), HYPR(KC_F11), HYPR(KC_F12), M(SWITCH_NDS), | 242 | MEH(KC_F7), MEH(KC_F8), MEH(KC_F9), MEH(KC_F10), MEH(KC_F11), MEH(KC_F12), M(SWITCH_NDS), |
| 242 | KC_TRNS, HYPR(KC_A), HYPR(KC_B), HYPR(KC_C), HYPR(KC_D), HYPR(KC_E), HYPR(KC_F), | 243 | KC_TRNS, MEH(KC_A), MEH(KC_B), MEH(KC_C), MEH(KC_D), MEH(KC_E), MEH(KC_F), |
| 243 | HYPR(KC_G), HYPR(KC_H), HYPR(KC_I), HYPR(KC_J), HYPR(KC_K), HYPR(KC_L), | 244 | MEH(KC_G), MEH(KC_H), MEH(KC_I), MEH(KC_J), MEH(KC_K), MEH(KC_L), |
| 244 | KC_TRNS, HYPR(KC_M), HYPR(KC_N), HYPR(KC_O), HYPR(KC_P), HYPR(KC_Q), HYPR(KC_R), | 245 | KC_TRNS, MEH(KC_M), MEH(KC_N), MEH(KC_O), MEH(KC_P), MEH(KC_Q), MEH(KC_R), |
| 245 | LALT(KC_LEFT),LALT(KC_RIGHT),KC_F5, LCTL(LGUI(KC_LEFT)), LCTL(LGUI(KC_RIGHT)), | 246 | MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), |
| 247 | MEH(KC_6), MEH(KC_7), | ||
| 248 | MEH(KC_8), | ||
| 249 | MEH(KC_9), MEH(KC_Y), MEH(KC_Z) | ||
| 250 | ), | ||
| 251 | |||
| 252 | |||
| 253 | [MOUSE] = KEYMAP( | ||
| 254 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 255 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 256 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 257 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 258 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 259 | KC_TRNS, KC_TRNS, | ||
| 260 | KC_TRNS, | ||
| 261 | KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 262 | // right hand | ||
| 263 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 264 | KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 265 | KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, | ||
| 266 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 267 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 246 | KC_TRNS, KC_TRNS, | 268 | KC_TRNS, KC_TRNS, |
| 247 | KC_TRNS, | 269 | KC_TRNS, |
| 248 | KC_TRNS, KC_TRNS, KC_TRNS | 270 | KC_TRNS, KC_BTN1, KC_BTN2 |
| 249 | ), | 271 | ), |
| 250 | 272 | ||
| 251 | |||
| 252 | }; | 273 | }; |
| 253 | 274 | ||
| 254 | 275 | ||
diff --git a/keyboards/ergodox/keymaps/pvinis/keymap.c b/keyboards/ergodox/keymaps/pvinis/keymap.c index df906201a..87ad70c91 100644 --- a/keyboards/ergodox/keymaps/pvinis/keymap.c +++ b/keyboards/ergodox/keymaps/pvinis/keymap.c | |||
| @@ -13,20 +13,16 @@ enum { | |||
| 13 | QWERTY, | 13 | QWERTY, |
| 14 | CARPALX, | 14 | CARPALX, |
| 15 | SYSCTL, | 15 | SYSCTL, |
| 16 | MOUSE, | ||
| 16 | }; | 17 | }; |
| 17 | 18 | ||
| 18 | // extra keys | 19 | // extra keys |
| 19 | enum { | 20 | enum { |
| 20 | NONE = 0, | 21 | NONE = 0, |
| 21 | 22 | ||
| 22 | // mouse | ||
| 23 | MS_UL, // up left | ||
| 24 | MS_UR, // up right | ||
| 25 | MS_DL, // down left | ||
| 26 | MS_DR, // down right | ||
| 27 | |||
| 28 | // tap dance | 23 | // tap dance |
| 29 | TD_FLSH, // flash keyboard | 24 | TD_FLSH, // flash keyboard |
| 25 | TD_LAYR, // SYSCTL and MOUSE layer switch | ||
| 30 | }; | 26 | }; |
| 31 | 27 | ||
| 32 | // application selection | 28 | // application selection |
| @@ -52,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 52 | * | | | | | | | | | | | | | 48 | * | | | | | | | | | | | | |
| 53 | * `----------------------------------' `----------------------------------' | 49 | * `----------------------------------' `----------------------------------' |
| 54 | * ,-------------. ,-------------. | 50 | * ,-------------. ,-------------. |
| 55 | * |BEGIN |QWERTY| |SYSCTL| | | 51 | * |BEGIN |QWERTY| | | | |
| 56 | * ,------|------|------| |------+--------+------. | 52 | * ,------|------|------| |------+--------+------. |
| 57 | * | | |CARPAL| |Slack | | | | 53 | * | | |CARPAL| |Slack | | | |
| 58 | * |Backsp|LShift|------| |------| Enter |Space | | 54 | * |Backsp|LShift|------| |------| Enter |Space | |
| @@ -66,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 66 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 62 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 67 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 63 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 68 | 64 | ||
| 69 | ,TG(BEGIN) ,TG(QWERTY) | 65 | ,TG(BEGIN) ,TD(TD_LAYR) |
| 70 | ,TG(CARPALX) | 66 | ,TG(MOUSE) |
| 71 | ,KC_BSPC ,KC_LSFT ,TG(SYSCTL) | 67 | ,KC_BSPC ,KC_LSFT ,TD(TD_LAYR) |
| 72 | 68 | ||
| 73 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 69 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 74 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 70 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| @@ -85,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 85 | * a beginner's keymap i currently use. | 81 | * a beginner's keymap i currently use. |
| 86 | * | 82 | * |
| 87 | * ,--------------------------------------------------. ,--------------------------------------------------. | 83 | * ,--------------------------------------------------. ,--------------------------------------------------. |
| 88 | * | | 1 | 2 | 3 | 4 | 5 | 6 | | 6 | 7 | 8 | 9 | 0 | - | = | | 84 | * | | 1 | 2 | 3 | 4 | 5 | opt | | 6 | 7 | 8 | 9 | 0 | - | = | |
| 89 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | 85 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| |
| 90 | * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | | 86 | * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | \ | |
| 91 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 87 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| @@ -104,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 104 | * `--------------------' `----------------------' | 100 | * `--------------------' `----------------------' |
| 105 | */ | 101 | */ |
| 106 | [BEGIN] = KEYMAP( | 102 | [BEGIN] = KEYMAP( |
| 107 | KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_6 | 103 | KC_TRNS ,KC_1 ,KC_2 ,KC_3 ,KC_4 ,KC_5 ,KC_LALT |
| 108 | ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC | 104 | ,KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_LBRC |
| 109 | ,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G | 105 | ,CTL_T(KC_ESC) ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G |
| 110 | ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN | 106 | ,KC_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_LPRN |
| @@ -213,30 +209,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 213 | ,KC_TRNS ,KC_TRNS ,KC_TRNS | 209 | ,KC_TRNS ,KC_TRNS ,KC_TRNS |
| 214 | ), | 210 | ), |
| 215 | 211 | ||
| 216 | |||
| 217 | /* SYSCTL | 212 | /* SYSCTL |
| 218 | * a keymap to control my system. | 213 | * a keymap to control my system. |
| 219 | * | 214 | * |
| 215 | * ,--------------------------------------------------. ,------------------------------------------------------. | ||
| 216 | * | ^ | | | | | | | | | | | | | | | | ||
| 217 | * |--------+------+------+------+------+-------------| |------+------+------+----------+------+------+--------| | ||
| 218 | * | | | | | | | | | | Mute | Home | Up | End | | | | ||
| 219 | * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| | ||
| 220 | * | | | | | | |------| |------|VolUp | Left | Down |Right | | Lock | | ||
| 221 | * |--------+------+------+------+------+------| | | |------+------+----------+------+------+--------| | ||
| 222 | * | | | | | | | | | |VolDn | Prev |Play/Pause| Next | | Sleep | | ||
| 223 | * `--------+------+------+------+------+-------------' `-------------+------+----------+------+------+--------' | ||
| 224 | * | | | | | | | | | | | Power| | ||
| 225 | * `----------------------------------' `--------------------------------------' | ||
| 226 | * ,-------------. ,-------------. | ||
| 227 | * | | | | | | | ||
| 228 | * ,------|------|------| |------+------+------. | ||
| 229 | * | | | | | | | | | ||
| 230 | * | | |------| |------| | | | ||
| 231 | * | | | ^ | | | | | | ||
| 232 | * `--------------------' `--------------------' | ||
| 233 | */ | ||
| 234 | [SYSCTL] = KEYMAP( | ||
| 235 | KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 236 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 237 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 238 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 239 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 240 | |||
| 241 | ,KC_NO ,KC_NO | ||
| 242 | ,KC_NO | ||
| 243 | ,KC_NO ,KC_NO ,KC_TRNS | ||
| 244 | |||
| 245 | /*,KC_POP /// */,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | ||
| 246 | /* /// ,KC_PTRN*/,KC_NO ,KC_MUTE ,KC_HOME ,KC_UP ,KC_END ,KC_NO ,KC_NO | ||
| 247 | ,KC_VOLU ,KC_LEFT ,KC_DOWN ,KC_RGHT ,KC_NO ,LCTL(LSFT(KC_PWR)) | ||
| 248 | ,KC_NO ,KC_VOLD ,KC_MPRV ,KC_MPLY ,KC_MNXT ,KC_NO ,KC_SLEP | ||
| 249 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR | ||
| 250 | |||
| 251 | ,KC_NO ,KC_NO | ||
| 252 | ,KC_NO | ||
| 253 | ,KC_NO ,KC_NO ,KC_NO | ||
| 254 | ), | ||
| 255 | |||
| 256 | /* MOUSE | ||
| 257 | * a keymap to control my system. | ||
| 258 | * | ||
| 220 | * ,--------------------------------------------------. ,--------------------------------------------------. | 259 | * ,--------------------------------------------------. ,--------------------------------------------------. |
| 221 | * | | | | | | | | | | | | Mute |VolDn |VolUp | | | 260 | * | ^ | | | | | | | | | | | | | | | |
| 222 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | 261 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| |
| 223 | * | | | | | | | | | | |MsUpL | MsUp |MsUpR | | | | 262 | * | | | | | | | | | | | | MsUp | | | | |
| 224 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 263 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| 225 | * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | Lock | | 264 | * | | | | | | |------| |------| |MsLeft| MsDn |MsRght| | | |
| 226 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | 265 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| |
| 227 | * | | | | | | | | | | |MsDnL | MsDn | | | Sleep | | 266 | * | | | | | | | | | | | | | | | | |
| 228 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | 267 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' |
| 229 | * | | | | | | | | | | | Power| | 268 | * | | | | | | | | | | | | |
| 230 | * `----------------------------------' `----------------------------------' | 269 | * `----------------------------------' `----------------------------------' |
| 231 | * ,-------------. ,-------------. | 270 | * ,-------------. ,-------------. |
| 232 | * | | | | |MidClk| | 271 | * | | | | |MidClk| |
| 233 | * ,------|------|------| |------+------+------. | 272 | * ,------|------|------| |------+------+------. |
| 234 | * | | | | | |Left |Right | | 273 | * | | | | | |Left |Right | |
| 235 | * | | |------| |------| Click| Click| | 274 | * | | |------| |------| Click| Click| |
| 236 | * | | | | | | | | | 275 | * | | | ^ | | | | | |
| 237 | * `--------------------' `--------------------' | 276 | * `--------------------' `--------------------' |
| 238 | */ | 277 | */ |
| 239 | [SYSCTL] = KEYMAP( | 278 | [MOUSE] = KEYMAP( |
| 240 | KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 279 | KC_TRNS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 241 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 280 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 242 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 281 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| @@ -245,13 +284,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 245 | 284 | ||
| 246 | ,KC_NO ,KC_NO | 285 | ,KC_NO ,KC_NO |
| 247 | ,KC_NO | 286 | ,KC_NO |
| 248 | ,KC_NO ,KC_NO ,KC_NO | 287 | ,KC_NO ,KC_NO ,KC_TRNS |
| 249 | 288 | ||
| 250 | /*,KC_POP*/,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLD ,KC_VOLU ,KC_NO | 289 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 251 | /*,KC_PTRN*/,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO | 290 | ,KC_NO ,KC_NO ,KC_NO ,KC_MS_U ,KC_NO ,KC_NO ,KC_NO |
| 252 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LCTL(LSFT(KC_PWR)) | 291 | ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO |
| 253 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_SLEP | 292 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 254 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_PWR | 293 | ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO |
| 255 | 294 | ||
| 256 | ,KC_NO ,KC_NO | 295 | ,KC_NO ,KC_NO |
| 257 | ,KC_NO | 296 | ,KC_NO |
| @@ -341,48 +380,29 @@ void matrix_init_user() { | |||
| 341 | ergodox_led_all_off(); | 380 | ergodox_led_all_off(); |
| 342 | } | 381 | } |
| 343 | 382 | ||
| 344 | // extra keys | 383 | // light up leds based on the layer |
| 345 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | 384 | void matrix_scan_user(void) { |
| 346 | switch (id) { | 385 | uint8_t layer = biton32(layer_state); |
| 347 | 386 | ||
| 348 | // mouse | 387 | switch(layer) { |
| 349 | case MS_UL: | 388 | case SYSCTL: |
| 350 | if (record->event.pressed) { | 389 | ergodox_right_led_3_on(); |
| 351 | mousekey_on(KC_MS_UP); | ||
| 352 | mousekey_on(KC_MS_LEFT); | ||
| 353 | } else { | ||
| 354 | mousekey_off(KC_MS_UP); | ||
| 355 | mousekey_off(KC_MS_LEFT); | ||
| 356 | } | ||
| 357 | break; | ||
| 358 | case MS_UR: | ||
| 359 | if (record->event.pressed) { | ||
| 360 | mousekey_on(KC_MS_UP); | ||
| 361 | mousekey_on(KC_MS_RIGHT); | ||
| 362 | } else { | ||
| 363 | mousekey_off(KC_MS_UP); | ||
| 364 | mousekey_off(KC_MS_RIGHT); | ||
| 365 | } | ||
| 366 | break; | 390 | break; |
| 367 | case MS_DL: | 391 | case MOUSE: |
| 368 | if (record->event.pressed) { | 392 | ergodox_right_led_2_on(); |
| 369 | mousekey_on(KC_MS_DOWN); | ||
| 370 | mousekey_on(KC_MS_LEFT); | ||
| 371 | } else { | ||
| 372 | mousekey_off(KC_MS_DOWN); | ||
| 373 | mousekey_off(KC_MS_LEFT); | ||
| 374 | } | ||
| 375 | break; | 393 | break; |
| 376 | case MS_DR: | 394 | default: |
| 377 | if (record->event.pressed) { | 395 | ergodox_right_led_1_off(); |
| 378 | mousekey_on(KC_MS_DOWN); | 396 | ergodox_right_led_2_off(); |
| 379 | mousekey_on(KC_MS_RIGHT); | 397 | ergodox_right_led_3_off(); |
| 380 | } else { | ||
| 381 | mousekey_off(KC_MS_DOWN); | ||
| 382 | mousekey_off(KC_MS_RIGHT); | ||
| 383 | } | ||
| 384 | break; | 398 | break; |
| 385 | } | 399 | } |
| 400 | } | ||
| 401 | |||
| 402 | // extra keys | ||
| 403 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 404 | switch (id) { | ||
| 405 | } | ||
| 386 | return MACRO_NONE; | 406 | return MACRO_NONE; |
| 387 | } | 407 | } |
| 388 | 408 | ||
| @@ -425,6 +445,31 @@ void flash_dance_reset(qk_tap_dance_state_t *state, void *user_data) { | |||
| 425 | ergodox_right_led_3_off(); | 445 | ergodox_right_led_3_off(); |
| 426 | } | 446 | } |
| 427 | 447 | ||
| 448 | // SYSCTL on first tap, MOUSE ON second tap | ||
| 449 | void layers_dance_finished(qk_tap_dance_state_t *state, void *user_data) { | ||
| 450 | uint8_t layer = biton32(layer_state); | ||
| 451 | |||
| 452 | switch(state->count) { | ||
| 453 | case 1: | ||
| 454 | switch(layer) { | ||
| 455 | case SYSCTL: | ||
| 456 | layer_off(SYSCTL); | ||
| 457 | break; | ||
| 458 | case MOUSE: | ||
| 459 | layer_off(MOUSE); | ||
| 460 | break; | ||
| 461 | default: | ||
| 462 | layer_on(SYSCTL); | ||
| 463 | break; | ||
| 464 | } | ||
| 465 | break; | ||
| 466 | case 2: | ||
| 467 | layer_on(MOUSE); | ||
| 468 | break; | ||
| 469 | } | ||
| 470 | } | ||
| 471 | |||
| 428 | qk_tap_dance_action_t tap_dance_actions[] = { | 472 | qk_tap_dance_action_t tap_dance_actions[] = { |
| 429 | [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), | 473 | [TD_FLSH] = ACTION_TAP_DANCE_FN_ADVANCED( flash_each_tap, flash_dance_finished, flash_dance_reset ), |
| 474 | [TD_LAYR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, layers_dance_finished, NULL ), | ||
| 430 | }; | 475 | }; |
diff --git a/keyboards/ergodox/keymaps/reset_eeprom/keymap.c b/keyboards/ergodox/keymaps/reset_eeprom/keymap.c new file mode 100644 index 000000000..f708454ce --- /dev/null +++ b/keyboards/ergodox/keymaps/reset_eeprom/keymap.c | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | #include "ergodox.h" | ||
| 2 | #include "debug.h" | ||
| 3 | #include "action_layer.h" | ||
| 4 | #include "version.h" | ||
| 5 | |||
| 6 | #define BASE 0 // default layer | ||
| 7 | #define SYMB 1 // symbols | ||
| 8 | #define MDIA 2 // media keys | ||
| 9 | |||
| 10 | enum custom_keycodes { | ||
| 11 | PLACEHOLDER = SAFE_RANGE, // can always be here | ||
| 12 | EPRM, | ||
| 13 | VRSN, | ||
| 14 | RGB_SLD | ||
| 15 | }; | ||
| 16 | |||
| 17 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 18 | /* Keymap 0: Basic layer | ||
| 19 | * | ||
| 20 | * ,--------------------------------------------------. ,--------------------------------------------------. | ||
| 21 | * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | | ||
| 22 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| | ||
| 23 | * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | | ||
| 24 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| | ||
| 25 | * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | | ||
| 26 | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| | ||
| 27 | * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | | ||
| 28 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' | ||
| 29 | * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | | ||
| 30 | * `----------------------------------' `----------------------------------' | ||
| 31 | * ,-------------. ,-------------. | ||
| 32 | * | App | LGui | | Alt |Ctrl/Esc| | ||
| 33 | * ,------|------|------| |------+--------+------. | ||
| 34 | * | | | Home | | PgUp | | | | ||
| 35 | * | Space|Backsp|------| |------| Tab |Enter | | ||
| 36 | * | |ace | End | | PgDn | | | | ||
| 37 | * `--------------------' `----------------------' | ||
| 38 | */ | ||
| 39 | // If it accepts an argument (i.e, is a function), it doesn't need KC_. | ||
| 40 | // Otherwise, it needs KC_* | ||
| 41 | [BASE] = KEYMAP( // layer 0 : default | ||
| 42 | // left hand | ||
| 43 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 44 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 45 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 46 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 47 | EPRM, EPRM, EPRM, EPRM,EPRM, | ||
| 48 | EPRM, EPRM, | ||
| 49 | EPRM, | ||
| 50 | EPRM,EPRM,EPRM, | ||
| 51 | // right hand | ||
| 52 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 53 | EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, EPRM, | ||
| 54 | EPRM, EPRM, EPRM, EPRM, EPRM,EPRM, | ||
| 55 | EPRM,EPRM, EPRM, EPRM,EPRM, EPRM, EPRM, | ||
| 56 | EPRM, EPRM,EPRM,EPRM, EPRM, | ||
| 57 | EPRM, EPRM, | ||
| 58 | EPRM, | ||
| 59 | EPRM,EPRM, EPRM | ||
| 60 | ) | ||
| 61 | }; | ||
| 62 | |||
| 63 | const uint16_t PROGMEM fn_actions[] = { | ||
| 64 | [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) | ||
| 65 | }; | ||
| 66 | |||
| 67 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 68 | { | ||
| 69 | // MACRODOWN only works in this function | ||
| 70 | switch(id) { | ||
| 71 | case 0: | ||
| 72 | if (record->event.pressed) { | ||
| 73 | SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 74 | } | ||
| 75 | break; | ||
| 76 | case 1: | ||
| 77 | if (record->event.pressed) { // For resetting EEPROM | ||
| 78 | eeconfig_init(); | ||
| 79 | } | ||
| 80 | break; | ||
| 81 | } | ||
| 82 | return MACRO_NONE; | ||
| 83 | }; | ||
| 84 | |||
| 85 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 86 | switch (keycode) { | ||
| 87 | // dynamically generate these. | ||
| 88 | case EPRM: | ||
| 89 | if (record->event.pressed) { | ||
| 90 | eeconfig_init(); | ||
| 91 | } | ||
| 92 | return false; | ||
| 93 | break; | ||
| 94 | case VRSN: | ||
| 95 | if (record->event.pressed) { | ||
| 96 | SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); | ||
| 97 | } | ||
| 98 | return false; | ||
| 99 | break; | ||
| 100 | case RGB_SLD: | ||
| 101 | if (record->event.pressed) { | ||
| 102 | #ifdef RGBLIGHT_ENABLE | ||
| 103 | rgblight_mode(1); | ||
| 104 | #endif | ||
| 105 | } | ||
| 106 | return false; | ||
| 107 | break; | ||
| 108 | } | ||
| 109 | return true; | ||
| 110 | } | ||
| 111 | |||
| 112 | // Runs just one time when the keyboard initializes. | ||
| 113 | void matrix_init_user(void) { | ||
| 114 | |||
| 115 | }; | ||
| 116 | |||
| 117 | |||
| 118 | // Runs constantly in the background, in a loop. | ||
| 119 | void matrix_scan_user(void) { | ||
| 120 | |||
| 121 | uint8_t layer = biton32(layer_state); | ||
| 122 | |||
| 123 | ergodox_board_led_off(); | ||
| 124 | ergodox_right_led_1_off(); | ||
| 125 | ergodox_right_led_2_off(); | ||
| 126 | ergodox_right_led_3_off(); | ||
| 127 | switch (layer) { | ||
| 128 | // TODO: Make this relevant to the ErgoDox EZ. | ||
| 129 | case 1: | ||
| 130 | ergodox_right_led_1_on(); | ||
| 131 | break; | ||
| 132 | case 2: | ||
| 133 | ergodox_right_led_2_on(); | ||
| 134 | break; | ||
| 135 | default: | ||
| 136 | // none | ||
| 137 | break; | ||
| 138 | } | ||
| 139 | |||
| 140 | }; | ||
diff --git a/keyboards/handwired/pilcrow/Makefile b/keyboards/handwired/pilcrow/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/pilcrow/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h new file mode 100644 index 000000000..d63eeba36 --- /dev/null +++ b/keyboards/handwired/pilcrow/config.h | |||
| @@ -0,0 +1,162 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 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 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6060 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER You | ||
| 28 | #define PRODUCT pilcrow | ||
| 29 | #define DESCRIPTION A custom keyboard | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 4 | ||
| 33 | #define MATRIX_COLS 10 | ||
| 34 | |||
| 35 | /* | ||
| 36 | * Keyboard Matrix Assignments | ||
| 37 | * | ||
| 38 | * Change this to how you wired your keyboard | ||
| 39 | * COLS: AVR pins used for columns, left to right | ||
| 40 | * ROWS: AVR pins used for rows, top to bottom | ||
| 41 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 42 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 43 | * | ||
| 44 | */ | ||
| 45 | #define MATRIX_ROW_PINS { B4, F7, B1, B3 } | ||
| 46 | #define MATRIX_COL_PINS { D4, C6, D7, E6, F5, F6, B6, B2, F4, B5} | ||
| 47 | #define UNUSED_PINS | ||
| 48 | |||
| 49 | /* COL2ROW or ROW2COL */ | ||
| 50 | #define DIODE_DIRECTION COL2ROW | ||
| 51 | |||
| 52 | // #define BACKLIGHT_PIN B7 | ||
| 53 | // #define BACKLIGHT_BREATHING | ||
| 54 | // #define BACKLIGHT_LEVELS 3 | ||
| 55 | |||
| 56 | |||
| 57 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 58 | #define DEBOUNCING_DELAY 5 | ||
| 59 | |||
| 60 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 61 | //#define MATRIX_HAS_GHOST | ||
| 62 | |||
| 63 | /* number of backlight levels */ | ||
| 64 | |||
| 65 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 66 | #define LOCKING_SUPPORT_ENABLE | ||
| 67 | /* Locking resynchronize hack */ | ||
| 68 | #define LOCKING_RESYNC_ENABLE | ||
| 69 | |||
| 70 | /* | ||
| 71 | * Force NKRO | ||
| 72 | * | ||
| 73 | * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | ||
| 74 | * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | ||
| 75 | * makefile for this to work.) | ||
| 76 | * | ||
| 77 | * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | ||
| 78 | * until the next keyboard reset. | ||
| 79 | * | ||
| 80 | * NKRO may prevent your keystrokes from being detected in the BIOS, but it is | ||
| 81 | * fully operational during normal computer usage. | ||
| 82 | * | ||
| 83 | * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | ||
| 84 | * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | ||
| 85 | * bootmagic, NKRO mode will always be enabled until it is toggled again during a | ||
| 86 | * power-up. | ||
| 87 | * | ||
| 88 | */ | ||
| 89 | //#define FORCE_NKRO | ||
| 90 | |||
| 91 | /* | ||
| 92 | * Magic Key Options | ||
| 93 | * | ||
| 94 | * Magic keys are hotkey commands that allow control over firmware functions of | ||
| 95 | * the keyboard. They are best used in combination with the HID Listen program, | ||
| 96 | * found here: https://www.pjrc.com/teensy/hid_listen.html | ||
| 97 | * | ||
| 98 | * The options below allow the magic key functionality to be changed. This is | ||
| 99 | * useful if your keyboard/keypad is missing keys and you want magic key support. | ||
| 100 | * | ||
| 101 | */ | ||
| 102 | |||
| 103 | /* key combination for magic key command */ | ||
| 104 | #define IS_COMMAND() ( \ | ||
| 105 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 106 | ) | ||
| 107 | |||
| 108 | /* control how magic key switches layers */ | ||
| 109 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | ||
| 110 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | ||
| 111 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | ||
| 112 | |||
| 113 | /* override magic key keymap */ | ||
| 114 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | ||
| 115 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | ||
| 116 | //#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | ||
| 117 | //#define MAGIC_KEY_HELP1 H | ||
| 118 | //#define MAGIC_KEY_HELP2 SLASH | ||
| 119 | //#define MAGIC_KEY_DEBUG D | ||
| 120 | //#define MAGIC_KEY_DEBUG_MATRIX X | ||
| 121 | //#define MAGIC_KEY_DEBUG_KBD K | ||
| 122 | //#define MAGIC_KEY_DEBUG_MOUSE M | ||
| 123 | //#define MAGIC_KEY_VERSION V | ||
| 124 | //#define MAGIC_KEY_STATUS S | ||
| 125 | //#define MAGIC_KEY_CONSOLE C | ||
| 126 | //#define MAGIC_KEY_LAYER0_ALT1 ESC | ||
| 127 | //#define MAGIC_KEY_LAYER0_ALT2 GRAVE | ||
| 128 | //#define MAGIC_KEY_LAYER0 0 | ||
| 129 | //#define MAGIC_KEY_LAYER1 1 | ||
| 130 | //#define MAGIC_KEY_LAYER2 2 | ||
| 131 | //#define MAGIC_KEY_LAYER3 3 | ||
| 132 | //#define MAGIC_KEY_LAYER4 4 | ||
| 133 | //#define MAGIC_KEY_LAYER5 5 | ||
| 134 | //#define MAGIC_KEY_LAYER6 6 | ||
| 135 | //#define MAGIC_KEY_LAYER7 7 | ||
| 136 | //#define MAGIC_KEY_LAYER8 8 | ||
| 137 | //#define MAGIC_KEY_LAYER9 9 | ||
| 138 | //#define MAGIC_KEY_BOOTLOADER PAUSE | ||
| 139 | //#define MAGIC_KEY_LOCK CAPS | ||
| 140 | //#define MAGIC_KEY_EEPROM E | ||
| 141 | //#define MAGIC_KEY_NKRO N | ||
| 142 | //#define MAGIC_KEY_SLEEP_LED Z | ||
| 143 | |||
| 144 | /* | ||
| 145 | * Feature disable options | ||
| 146 | * These options are also useful to firmware size reduction. | ||
| 147 | */ | ||
| 148 | |||
| 149 | /* disable debug print */ | ||
| 150 | //#define NO_DEBUG | ||
| 151 | |||
| 152 | /* disable print */ | ||
| 153 | //#define NO_PRINT | ||
| 154 | |||
| 155 | /* disable action features */ | ||
| 156 | //#define NO_ACTION_LAYER | ||
| 157 | //#define NO_ACTION_TAPPING | ||
| 158 | //#define NO_ACTION_ONESHOT | ||
| 159 | //#define NO_ACTION_MACRO | ||
| 160 | //#define NO_ACTION_FUNCTION | ||
| 161 | |||
| 162 | #endif | ||
diff --git a/keyboards/handwired/pilcrow/keymaps/default/Makefile b/keyboards/handwired/pilcrow/keymaps/default/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/handwired/pilcrow/keymaps/default/Makefile | |||
| @@ -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 # Virtual DIP switch configuration(+1000) | ||
| 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 = yes # 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 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 16 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 17 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 18 | |||
| 19 | ifndef QUANTUM_DIR | ||
| 20 | include ../../../../Makefile | ||
| 21 | endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/pilcrow/keymaps/default/config.h b/keyboards/handwired/pilcrow/keymaps/default/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/handwired/pilcrow/keymaps/default/config.h | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | #ifndef CONFIG_USER_H | ||
| 2 | #define CONFIG_USER_H | ||
| 3 | |||
| 4 | #include "../../config.h" | ||
| 5 | |||
| 6 | // place overrides here | ||
| 7 | |||
| 8 | #endif \ No newline at end of file | ||
diff --git a/keyboards/handwired/pilcrow/keymaps/default/keymap.c b/keyboards/handwired/pilcrow/keymaps/default/keymap.c new file mode 100644 index 000000000..e382e4c6a --- /dev/null +++ b/keyboards/handwired/pilcrow/keymaps/default/keymap.c | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | #include "pilcrow.h" | ||
| 2 | #define _______ KC_TRNS | ||
| 3 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 4 | [0] = KEYMAP( \ | ||
| 5 | KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ | ||
| 6 | KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ | ||
| 7 | KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, \ | ||
| 8 | KC_LCTL, KC_LALT, KC_LGUI, MO(1), KC_SPC, MT(MOD_LSFT, KC_SPC), MO(2), MO(3), KC_DEL, KC_ESC \ | ||
| 9 | ), | ||
| 10 | |||
| 11 | /* Colemak | ||
| 12 | * ,-----------------------------------------------------------------------------------. | ||
| 13 | * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | | ||
| 14 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 15 | * | Esc | A | R | S | T | D | H | N | E | I | O | " | | ||
| 16 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 17 | * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | | ||
| 18 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 19 | * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | | ||
| 20 | * `-----------------------------------------------------------------------------------' | ||
| 21 | */ | ||
| 22 | [1] = KEYMAP( \ | ||
| 23 | KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ | ||
| 24 | KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, \ | ||
| 25 | KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),KC_PIPE, S(KC_QUOT), \ | ||
| 26 | _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_GRV \ | ||
| 27 | ), | ||
| 28 | [2] = KEYMAP( \ | ||
| 29 | KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ | ||
| 30 | KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, \ | ||
| 31 | OSM(MOD_LSFT), KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_BSLS, KC_QUOT, \ | ||
| 32 | _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_MNXT, KC_VOLD, KC_VOLU \ | ||
| 33 | ), | ||
| 34 | |||
| 35 | /* Adjust (Lower + Raise) | ||
| 36 | * ,-----------------------------------------------------------------------------------. | ||
| 37 | * | | Reset| | | | | | | | | | Del | | ||
| 38 | * |------+------+------+------+------+-------------+------+------+------+------+------| | ||
| 39 | * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | | ||
| 40 | * |------+------+------+------+------+------|------+------+------+------+------+------| | ||
| 41 | * | | | | | | | | | | | | | | ||
| 42 | * |------+------+------+------+------+------+------+------+------+------+------+------| | ||
| 43 | * | | | | | | | | | | | | | ||
| 44 | * `-----------------------------------------------------------------------------------' | ||
| 45 | */ | ||
| 46 | [3] = KEYMAP( \ | ||
| 47 | RESET, KC_UP, _______, _______, _______, _______, _______, KC_MS_WH_DOWN, KC_MS_U, KC_MS_WH_UP, \ | ||
| 48 | KC_LEFT, KC_DOWN, KC_RIGHT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_MS_L,KC_MS_D, KC_MS_R, \ | ||
| 49 | RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, \ | ||
| 50 | _______, _______, _______, _______, KC_MS_BTN1, KC_MS_BTN2, _______, _______, _______, _______ \ | ||
| 51 | ) | ||
| 52 | }; | ||
| 53 | |||
| 54 | const uint16_t PROGMEM fn_actions[] = { | ||
| 55 | |||
| 56 | }; | ||
| 57 | |||
| 58 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 59 | { | ||
| 60 | // MACRODOWN only works in this function | ||
| 61 | switch(id) { | ||
| 62 | case 0: | ||
| 63 | if (record->event.pressed) { | ||
| 64 | register_code(KC_RSFT); | ||
| 65 | } else { | ||
| 66 | unregister_code(KC_RSFT); | ||
| 67 | } | ||
| 68 | break; | ||
| 69 | } | ||
| 70 | return MACRO_NONE; | ||
| 71 | }; | ||
| 72 | |||
| 73 | |||
| 74 | void matrix_init_user(void) { | ||
| 75 | |||
| 76 | } | ||
| 77 | |||
| 78 | void matrix_scan_user(void) { | ||
| 79 | |||
| 80 | } | ||
| 81 | |||
| 82 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 83 | return true; | ||
| 84 | } | ||
| 85 | |||
| 86 | void led_set_user(uint8_t usb_led) { | ||
| 87 | |||
| 88 | } \ No newline at end of file | ||
diff --git a/keyboards/handwired/pilcrow/keymaps/default/readme.md b/keyboards/handwired/pilcrow/keymaps/default/readme.md new file mode 100644 index 000000000..95472dfca --- /dev/null +++ b/keyboards/handwired/pilcrow/keymaps/default/readme.md | |||
| @@ -0,0 +1 @@ | |||
| # The default keymap for pilcrow \ No newline at end of file | |||
diff --git a/keyboards/handwired/pilcrow/pilcrow.c b/keyboards/handwired/pilcrow/pilcrow.c new file mode 100644 index 000000000..c8243df7b --- /dev/null +++ b/keyboards/handwired/pilcrow/pilcrow.c | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #include "pilcrow.h" | ||
| 2 | |||
| 3 | void matrix_init_kb(void) { | ||
| 4 | // put your keyboard start-up code here | ||
| 5 | // runs once when the firmware starts up | ||
| 6 | |||
| 7 | matrix_init_user(); | ||
| 8 | } | ||
| 9 | |||
| 10 | void matrix_scan_kb(void) { | ||
| 11 | // put your looping keyboard code here | ||
| 12 | // runs every cycle (a lot) | ||
| 13 | |||
| 14 | matrix_scan_user(); | ||
| 15 | } | ||
| 16 | |||
| 17 | bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | ||
| 18 | // put your per-action keyboard code here | ||
| 19 | // runs for every action, just before processing by the firmware | ||
| 20 | |||
| 21 | return process_record_user(keycode, record); | ||
| 22 | } | ||
| 23 | |||
| 24 | void led_set_kb(uint8_t usb_led) { | ||
| 25 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 26 | |||
| 27 | led_set_user(usb_led); | ||
| 28 | } | ||
diff --git a/keyboards/handwired/pilcrow/pilcrow.h b/keyboards/handwired/pilcrow/pilcrow.h new file mode 100644 index 000000000..7138ccb3f --- /dev/null +++ b/keyboards/handwired/pilcrow/pilcrow.h | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #ifndef PILCROW_H | ||
| 2 | #define PILCROW_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // This a shortcut to help you visually see your layout. | ||
| 7 | // The following is an example using the Planck MIT layout | ||
| 8 | // The first section contains all of the arguements | ||
| 9 | // The second converts the arguments into a two-dimensional array | ||
| 10 | #define KEYMAP( \ | ||
| 11 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, \ | ||
| 12 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, \ | ||
| 13 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, \ | ||
| 14 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 \ | ||
| 15 | ) \ | ||
| 16 | { \ | ||
| 17 | { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ | ||
| 18 | { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ | ||
| 19 | { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ | ||
| 20 | { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39 } \ | ||
| 21 | } | ||
| 22 | |||
| 23 | #endif | ||
diff --git a/keyboards/handwired/pilcrow/readme.md b/keyboards/handwired/pilcrow/readme.md new file mode 100644 index 000000000..7a7f6d2af --- /dev/null +++ b/keyboards/handwired/pilcrow/readme.md | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | pilcrow keyboard firmware | ||
| 2 | ====================== | ||
| 3 | |||
| 4 | ## Quantum MK Firmware | ||
| 5 | |||
| 6 | For the full Quantum feature list, see [the parent readme](/). | ||
| 7 | |||
| 8 | ## Building | ||
| 9 | |||
| 10 | Download or clone the whole firmware and navigate to the keyboards/pilcrow folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. | ||
| 11 | |||
| 12 | Depending on which keymap you would like to use, you will have to compile slightly differently. | ||
| 13 | |||
| 14 | ### Default | ||
| 15 | |||
| 16 | To build with the default keymap, simply run `make default`. | ||
| 17 | |||
| 18 | ### Other Keymaps | ||
| 19 | |||
| 20 | Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. | ||
| 21 | |||
| 22 | To build the firmware binary hex file with a keymap just do `make` with a keymap like this: | ||
| 23 | |||
| 24 | ``` | ||
| 25 | $ make [default|jack|<name>] | ||
| 26 | ``` | ||
| 27 | |||
| 28 | Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. | ||
diff --git a/keyboards/handwired/pilcrow/rules.mk b/keyboards/handwired/pilcrow/rules.mk new file mode 100644 index 000000000..55898147d --- /dev/null +++ b/keyboards/handwired/pilcrow/rules.mk | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | # MCU name | ||
| 2 | #MCU = at90usb1287 | ||
| 3 | MCU = atmega32u4 | ||
| 4 | |||
| 5 | # Processor frequency. | ||
| 6 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 7 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 8 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 9 | # automatically to create a 32-bit value in your source code. | ||
| 10 | # | ||
| 11 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 12 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 13 | # does not *change* the processor frequency - it should merely be updated to | ||
| 14 | # reflect the processor speed set externally so that the code can use accurate | ||
| 15 | # software delays. | ||
| 16 | F_CPU = 16000000 | ||
| 17 | |||
| 18 | |||
| 19 | # | ||
| 20 | # LUFA specific | ||
| 21 | # | ||
| 22 | # Target architecture (see library "Board Types" documentation). | ||
| 23 | ARCH = AVR8 | ||
| 24 | |||
| 25 | # Input clock frequency. | ||
| 26 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 27 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 28 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 29 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 30 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 31 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 32 | # source code. | ||
| 33 | # | ||
| 34 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 35 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 36 | F_USB = $(F_CPU) | ||
| 37 | |||
| 38 | # Interrupt driven control endpoint task(+60) | ||
| 39 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 40 | |||
| 41 | |||
| 42 | # Boot Section Size in *bytes* | ||
| 43 | # Teensy halfKay 512 | ||
| 44 | # Teensy++ halfKay 1024 | ||
| 45 | # Atmel DFU loader 4096 | ||
| 46 | # LUFA bootloader 4096 | ||
| 47 | # USBaspLoader 2048 | ||
| 48 | OPT_DEFS += -DBOOTLOADER_SIZE=512 | ||
| 49 | |||
| 50 | |||
| 51 | # Build Options | ||
| 52 | # change yes to no to disable | ||
| 53 | # | ||
| 54 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 55 | MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) | ||
| 56 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 57 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 58 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 59 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 60 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | ||
| 61 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 62 | NKRO_ENABLE ?= no # USB Nkey Rollover | ||
| 63 | BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default | ||
| 64 | MIDI_ENABLE ?= no # MIDI controls | ||
| 65 | UNICODE_ENABLE ?= no # Unicode | ||
| 66 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 67 | AUDIO_ENABLE ?= no # Audio output on port C6 | ||
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 473af67d3..23fbfd0b9 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h | |||
| @@ -20,13 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 20 | 20 | ||
| 21 | #include "config_common.h" | 21 | #include "config_common.h" |
| 22 | 22 | ||
| 23 | #define USB_VENDOR_ID_LENOVO 0x17ef | ||
| 24 | #define USB_DEVICE_ID_LENOVO_TPKBD 0x6009 | ||
| 25 | #define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047 | ||
| 26 | #define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048 | ||
| 27 | #define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067 | ||
| 28 | |||
| 23 | /* USB Device descriptor parameter */ | 29 | /* USB Device descriptor parameter */ |
| 24 | #define VENDOR_ID 0xFEED | 30 | #define VENDOR_ID USB_VENDOR_ID_LENOVO |
| 25 | #define PRODUCT_ID 0x6660 | 31 | #define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD |
| 26 | #define DEVICE_VER 0x0001 | 32 | #define DEVICE_VER 0x0001 |
| 27 | #define MANUFACTURER Priyadi | 33 | #define MANUFACTURER Priyadi |
| 28 | #define PRODUCT Promethium Keyboard | 34 | #define PRODUCT Promethium Keyboard |
| 29 | #define DESCRIPTION Promethium Keyboard | 35 | #define DESCRIPTION |
| 30 | 36 | ||
| 31 | /* key matrix size */ | 37 | /* key matrix size */ |
| 32 | #define MATRIX_ROWS 8 | 38 | #define MATRIX_ROWS 8 |
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index bf797a749..7ae269563 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c | |||
| @@ -425,7 +425,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 425 | */ | 425 | */ |
| 426 | [_QWERTY] = KEYMAP( | 426 | [_QWERTY] = KEYMAP( |
| 427 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, | 427 | KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, |
| 428 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT , | 428 | KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT , |
| 429 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | 429 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, |
| 430 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | 430 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL |
| 431 | ), | 431 | ), |
| @@ -442,10 +442,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 442 | * `-----------------------------------------------------------------------------------' | 442 | * `-----------------------------------------------------------------------------------' |
| 443 | */ | 443 | */ |
| 444 | [_COLEMAK] = KEYMAP( | 444 | [_COLEMAK] = KEYMAP( |
| 445 | KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, | 445 | _______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______, |
| 446 | KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT , | 446 | _______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______, |
| 447 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | 447 | _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______, |
| 448 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | 448 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 449 | ), | 449 | ), |
| 450 | 450 | ||
| 451 | /* Workman | 451 | /* Workman |
| @@ -460,10 +460,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 460 | * `-----------------------------------------------------------------------------------' | 460 | * `-----------------------------------------------------------------------------------' |
| 461 | */ | 461 | */ |
| 462 | [_WORKMAN] = KEYMAP( | 462 | [_WORKMAN] = KEYMAP( |
| 463 | KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC, | 463 | _______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______, |
| 464 | KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT , | 464 | _______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______, |
| 465 | KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, | 465 | _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______, |
| 466 | KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL | 466 | _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ |
| 467 | ), | 467 | ), |
| 468 | 468 | ||
| 469 | /* Punc | 469 | /* Punc |
| @@ -551,7 +551,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 551 | */ | 551 | */ |
| 552 | [_GUI] = KEYMAP( | 552 | [_GUI] = KEYMAP( |
| 553 | _______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______, | 553 | _______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______, |
| 554 | LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY, | 554 | LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,KC_PAUS, QWERTY, |
| 555 | WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, | 555 | WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, |
| 556 | OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN | 556 | OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN |
| 557 | ), | 557 | ), |
| @@ -582,6 +582,39 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 582 | #endif | 582 | #endif |
| 583 | 583 | ||
| 584 | switch (keycode) { | 584 | switch (keycode) { |
| 585 | // QWERTZ style comma and dot: semicolon and colon when shifted | ||
| 586 | case KC_COMM: | ||
| 587 | if (record->event.pressed) { | ||
| 588 | bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); | ||
| 589 | bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); | ||
| 590 | if (lshifted || rshifted) { | ||
| 591 | if (lshifted) unregister_code(KC_LSFT); | ||
| 592 | if (rshifted) unregister_code(KC_RSFT); | ||
| 593 | register_code(KC_SCLN); | ||
| 594 | unregister_code(KC_SCLN); | ||
| 595 | if (lshifted) register_code(KC_LSFT); | ||
| 596 | if (rshifted) register_code(KC_RSFT); | ||
| 597 | } else { | ||
| 598 | register_code(KC_COMM); | ||
| 599 | unregister_code(KC_COMM); | ||
| 600 | } | ||
| 601 | } | ||
| 602 | return false; | ||
| 603 | break; | ||
| 604 | case KC_DOT: | ||
| 605 | if (record->event.pressed) { | ||
| 606 | if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { | ||
| 607 | register_code(KC_SCLN); | ||
| 608 | unregister_code(KC_SCLN); | ||
| 609 | } else { | ||
| 610 | register_code(KC_DOT); | ||
| 611 | unregister_code(KC_DOT); | ||
| 612 | } | ||
| 613 | } | ||
| 614 | return false; | ||
| 615 | break; | ||
| 616 | |||
| 617 | // layout switchers | ||
| 585 | case QWERTY: | 618 | case QWERTY: |
| 586 | if (record->event.pressed) { | 619 | if (record->event.pressed) { |
| 587 | #ifdef AUDIO_ENABLE | 620 | #ifdef AUDIO_ENABLE |
| @@ -610,8 +643,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 610 | return false; | 643 | return false; |
| 611 | break; | 644 | break; |
| 612 | 645 | ||
| 613 | 646 | // layer switcher | |
| 614 | |||
| 615 | case PUNC: | 647 | case PUNC: |
| 616 | if (record->event.pressed) { | 648 | if (record->event.pressed) { |
| 617 | layer_on(_PUNC); | 649 | layer_on(_PUNC); |
| @@ -673,7 +705,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 673 | return false; | 705 | return false; |
| 674 | break; | 706 | break; |
| 675 | 707 | ||
| 676 | 708 | // OS switchers | |
| 677 | case LINUX: | 709 | case LINUX: |
| 678 | set_unicode_input_mode(UC_LNX); | 710 | set_unicode_input_mode(UC_LNX); |
| 679 | #ifdef AUDIO_ENABLE | 711 | #ifdef AUDIO_ENABLE |
| @@ -736,106 +768,36 @@ void shutdown_user() | |||
| 736 | 768 | ||
| 737 | 769 | ||
| 738 | void ps2_mouse_init_user() { | 770 | void ps2_mouse_init_user() { |
| 771 | uint8_t rcv; | ||
| 772 | |||
| 739 | // set TrackPoint sensitivity | 773 | // set TrackPoint sensitivity |
| 740 | PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); | 774 | PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); |
| 741 | PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); | 775 | PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); |
| 742 | PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); | 776 | PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); |
| 743 | PS2_MOUSE_SEND(0x60, "set trackpoint sensitivity: 0x60"); | 777 | PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59"); |
| 778 | |||
| 779 | // set TrackPoint Negative Inertia factor | ||
| 780 | PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2"); | ||
| 781 | PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81"); | ||
| 782 | PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D"); | ||
| 783 | PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06"); | ||
| 744 | 784 | ||
| 745 | // set TrackPoint speed | 785 | // set TrackPoint speed |
| 746 | // (transfer function upper plateau speed) | 786 | // (transfer function upper plateau speed) |
| 747 | PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); | 787 | PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); |
| 748 | PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); | 788 | PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); |
| 749 | PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); | 789 | PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); |
| 750 | PS2_MOUSE_SEND(0x90, "set trackpoint speed: 0x90"); | 790 | PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61"); |
| 751 | 791 | ||
| 752 | // set TrackPoint Negative Inertia factor | 792 | // inquire pts status |
| 753 | PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2"); | ||
| 754 | PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81"); | ||
| 755 | PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D"); | ||
| 756 | PS2_MOUSE_SEND(0x03, "set negative inertia factor: 0x03"); | ||
| 757 | |||
| 758 | // disable up threshold (click) | ||
| 759 | PS2_MOUSE_SEND(0xE2, "set disable up threshold: 0xE2"); | ||
| 760 | PS2_MOUSE_SEND(0x47, "set disable up threshold: 0x47"); | ||
| 761 | PS2_MOUSE_SEND(0x2C, "set disable up threshold: 0x2C"); | ||
| 762 | PS2_MOUSE_SEND(0x01, "set disable up threshold: 0x01"); | ||
| 763 | |||
| 764 | // enable TrackPoint Press to Select (PtS) | ||
| 765 | // print("ps2_mouse_init: send 0xE2: "); | ||
| 766 | // rcv = ps2_host_send(0xE2); | ||
| 767 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 768 | // print("ps2_mouse_init: send 0x47: "); | ||
| 769 | // rcv = ps2_host_send(0x47); | ||
| 770 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 771 | // print("ps2_mouse_init: send 0x2C: "); | ||
| 772 | // rcv = ps2_host_send(0x2C); | ||
| 773 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 774 | // print("ps2_mouse_init: send 0x00: "); | ||
| 775 | // rcv = ps2_host_send(0x00); | ||
| 776 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 777 | |||
| 778 | // set TrackPoint Press to Select threshold | ||
| 779 | // print("ps2_mouse_init: send 0xE2: "); | ||
| 780 | // rcv = ps2_host_send(0xE2); | ||
| 781 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 782 | // print("ps2_mouse_init: send 0x81: "); | ||
| 783 | // rcv = ps2_host_send(0x81); | ||
| 784 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 785 | // print("ps2_mouse_init: send 0x5C: "); | ||
| 786 | // rcv = ps2_host_send(0x5C); | ||
| 787 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 788 | // // default PtS threshold is 0x08 | ||
| 789 | // print("ps2_mouse_init: send 0x04: "); | ||
| 790 | // rcv = ps2_host_send(0x04); | ||
| 791 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 792 | |||
| 793 | // set TrackPoint Press to Select time constant (zTc) | ||
| 794 | // print("ps2_mouse_init: send 0xE2: "); | ||
| 795 | // rcv = ps2_host_send(0xE2); | ||
| 796 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 797 | // print("ps2_mouse_init: send 0x81: "); | ||
| 798 | // rcv = ps2_host_send(0x81); | ||
| 799 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 800 | // print("ps2_mouse_init: send 0x5E: "); | ||
| 801 | // rcv = ps2_host_send(0x5E); | ||
| 802 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 803 | // // default zTc is 0x26 | ||
| 804 | // print("ps2_mouse_init: send 0x45: "); | ||
| 805 | // rcv = ps2_host_send(0x45); | ||
| 806 | // phex(rcv); phex(ps2_error); print("\n"); | ||
| 807 | |||
| 808 | /* | ||
| 809 | // set TrackPoint Press to Select Jenks Curvature (jkcur) | ||
| 810 | print("ps2_mouse_init: send 0xE2: "); | ||
| 811 | rcv = ps2_host_send(0xE2); | ||
| 812 | phex(rcv); phex(ps2_error); print("\n"); | ||
| 813 | print("ps2_mouse_init: send 0x81: "); | ||
| 814 | rcv = ps2_host_send(0x81); | ||
| 815 | phex(rcv); phex(ps2_error); print("\n"); | ||
| 816 | print("ps2_mouse_init: send 0x5D: "); | ||
| 817 | rcv = ps2_host_send(0x5D); | ||
| 818 | phex(rcv); phex(ps2_error); print("\n"); | ||
| 819 | // default jkcur is 0x87 | ||
| 820 | print("ps2_mouse_init: send 0x87: "); | ||
| 821 | rcv = ps2_host_send(0x87); | ||
| 822 | phex(rcv); phex(ps2_error); print("\n"); | ||
| 823 | */ | ||
| 824 | |||
| 825 | /* | ||
| 826 | // set TrackPoint Minimum Drag (mindrag) | ||
| 827 | print("ps2_mouse_init: send 0xE2: "); | ||
| 828 | rcv = ps2_host_send(0xE2); | 793 | rcv = ps2_host_send(0xE2); |
| 829 | phex(rcv); phex(ps2_error); print("\n"); | 794 | rcv = ps2_host_send(0x2C); |
| 830 | print("ps2_mouse_init: send 0x81: "); | 795 | rcv = ps2_host_recv_response(); |
| 831 | rcv = ps2_host_send(0x81); | 796 | if ((rcv & 1) == 1) { |
| 832 | phex(rcv); phex(ps2_error); print("\n"); | 797 | // if on, disable pts |
| 833 | print("ps2_mouse_init: send 0x59: "); | 798 | rcv = ps2_host_send(0xE2); |
| 834 | rcv = ps2_host_send(0x59); | 799 | rcv = ps2_host_send(0x47); |
| 835 | phex(rcv); phex(ps2_error); print("\n"); | 800 | rcv = ps2_host_send(0x2C); |
| 836 | // default PtS mindrag is 0x14 | 801 | rcv = ps2_host_send(0x01); |
| 837 | print("ps2_mouse_init: send 0x14: "); | 802 | } |
| 838 | rcv = ps2_host_send(0x14); | ||
| 839 | phex(rcv); phex(ps2_error); print("\n"); | ||
| 840 | */ | ||
| 841 | } \ No newline at end of file | 803 | } \ No newline at end of file |
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 891f523c2..465ef3359 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk | |||
| @@ -1,4 +1,3 @@ | |||
| 1 | |||
| 2 | # MCU name | 1 | # MCU name |
| 3 | #MCU = at90usb1287 | 2 | #MCU = at90usb1287 |
| 4 | MCU = atmega32u4 | 3 | MCU = atmega32u4 |
| @@ -66,6 +65,8 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
| 66 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 65 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
| 67 | PS2_MOUSE_ENABLE ?= yes | 66 | PS2_MOUSE_ENABLE ?= yes |
| 68 | PS2_USE_INT ?= yes | 67 | PS2_USE_INT ?= yes |
| 68 | ADAFRUIT_BLE_ENABLE ?= yes | ||
| 69 | API_SYSEX_ENABLE ?= no | ||
| 69 | 70 | ||
| 70 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 71 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 71 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend | 72 | SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend |
diff --git a/keyboards/lets_split/imgs/letssplitv2.svg b/keyboards/lets_split/imgs/letssplitv2.svg index c7bb1db86..f2cb9ce1e 100644 --- a/keyboards/lets_split/imgs/letssplitv2.svg +++ b/keyboards/lets_split/imgs/letssplitv2.svg | |||
| @@ -22,7 +22,7 @@ | |||
| 22 | style="display:inline"><metadata | 22 | style="display:inline"><metadata |
| 23 | id="metadata2286"><rdf:RDF><cc:Work | 23 | id="metadata2286"><rdf:RDF><cc:Work |
| 24 | rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type | 24 | rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type |
| 25 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs | 25 | rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs |
| 26 | id="defs2284"><inkscape:perspective | 26 | id="defs2284"><inkscape:perspective |
| 27 | sodipodi:type="inkscape:persp3d" | 27 | sodipodi:type="inkscape:persp3d" |
| 28 | inkscape:vp_x="0 : 338.38501 : 1" | 28 | inkscape:vp_x="0 : 338.38501 : 1" |
| @@ -538,7 +538,7 @@ | |||
| 538 | id="*Model_Space-0" /><symbol | 538 | id="*Model_Space-0" /><symbol |
| 539 | id="*Paper_Space-5" /><symbol | 539 | id="*Paper_Space-5" /><symbol |
| 540 | id="*Paper_Space0-0" /></defs><sodipodi:namedview | 540 | id="*Paper_Space0-0" /></defs><sodipodi:namedview |
| 541 | inkscape:window-height="1017" | 541 | inkscape:window-height="1019" |
| 542 | inkscape:window-width="1920" | 542 | inkscape:window-width="1920" |
| 543 | inkscape:pageshadow="2" | 543 | inkscape:pageshadow="2" |
| 544 | inkscape:pageopacity="0.0" | 544 | inkscape:pageopacity="0.0" |
| @@ -549,12 +549,12 @@ | |||
| 549 | bordercolor="#666666" | 549 | bordercolor="#666666" |
| 550 | pagecolor="#ffffff" | 550 | pagecolor="#ffffff" |
| 551 | id="base" | 551 | id="base" |
| 552 | inkscape:zoom="0.64873169" | 552 | inkscape:zoom="0.66928853" |
| 553 | inkscape:cx="112.50849" | 553 | inkscape:cx="198.17365" |
| 554 | inkscape:cy="381.60971" | 554 | inkscape:cy="416.82194" |
| 555 | inkscape:window-x="1912" | 555 | inkscape:window-x="0" |
| 556 | inkscape:window-y="-8" | 556 | inkscape:window-y="0" |
| 557 | inkscape:current-layer="layer9" | 557 | inkscape:current-layer="g21-5" |
| 558 | showgrid="false" | 558 | showgrid="false" |
| 559 | inkscape:window-maximized="1" | 559 | inkscape:window-maximized="1" |
| 560 | inkscape:document-units="mm" | 560 | inkscape:document-units="mm" |
| @@ -3961,8 +3961,8 @@ | |||
| 3961 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path | 3961 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path |
| 3962 | inkscape:connector-curvature="0" | 3962 | inkscape:connector-curvature="0" |
| 3963 | id="path29" | 3963 | id="path29" |
| 3964 | d="m 516.30882,655.63475 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" | 3964 | d="m 521.39659,648.5468 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" |
| 3965 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path | 3965 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path |
| 3966 | inkscape:connector-curvature="0" | 3966 | inkscape:connector-curvature="0" |
| 3967 | id="path31" | 3967 | id="path31" |
| 3968 | d="m 568.78387,625.5946 0.55008,0.0196" | 3968 | d="m 568.78387,625.5946 0.55008,0.0196" |
| @@ -5450,11 +5450,15 @@ | |||
| 5450 | inkscape:connector-curvature="0" | 5450 | inkscape:connector-curvature="0" |
| 5451 | id="path773" | 5451 | id="path773" |
| 5452 | d="m 559.93261,662.46739 -49.05055,0" | 5452 | d="m 559.93261,662.46739 -49.05055,0" |
| 5453 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /></g><g | 5453 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path |
| 5454 | inkscape:connector-curvature="0" | ||
| 5455 | id="path27-0" | ||
| 5456 | d="m 306.39384,853.88036 a 5.25588,5.25588 0 1 0 -10.51176,0 5.25588,5.25588 0 0 0 10.51176,0 z" | ||
| 5457 | style="display:inline;fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g><g | ||
| 5454 | id="g21-5" | 5458 | id="g21-5" |
| 5455 | inkscape:label="0" | 5459 | inkscape:label="0" |
| 5456 | transform="matrix(0.8,0,0,0.8,-113.89463,-231.54592)" | 5460 | transform="matrix(0.8,0,0,0.8,-113.89463,-231.54592)" |
| 5457 | style="stroke:#0000ff;stroke-opacity:1;stroke-width:0.03543307;stroke-miterlimit:4;stroke-dasharray:none"><path | 5461 | style="stroke:#0000ff;stroke-opacity:1;stroke-width:0.35433071;stroke-miterlimit:4;stroke-dasharray:none"><path |
| 5458 | inkscape:connector-curvature="0" | 5462 | inkscape:connector-curvature="0" |
| 5459 | id="path23-4" | 5463 | id="path23-4" |
| 5460 | d="m 240.31326,720.37047 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" | 5464 | d="m 240.31326,720.37047 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" |
| @@ -5469,8 +5473,8 @@ | |||
| 5469 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path | 5473 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path |
| 5470 | inkscape:connector-curvature="0" | 5474 | inkscape:connector-curvature="0" |
| 5471 | id="path29-1" | 5475 | id="path29-1" |
| 5472 | d="m 516.30882,655.63475 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" | 5476 | d="m 523.39658,648.54862 a 5.2558782,5.2558782 0 1 0 -10.51175,0 5.2558782,5.2558782 0 1 0 10.51175,0 z" |
| 5473 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path | 5477 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /><path |
| 5474 | inkscape:connector-curvature="0" | 5478 | inkscape:connector-curvature="0" |
| 5475 | id="path31-6" | 5479 | id="path31-6" |
| 5476 | d="m 568.78387,625.5946 0.55008,0.0196" | 5480 | d="m 568.78387,625.5946 0.55008,0.0196" |
| @@ -5806,4 +5810,8 @@ | |||
| 5806 | inkscape:connector-curvature="0" | 5810 | inkscape:connector-curvature="0" |
| 5807 | id="path197-7" | 5811 | id="path197-7" |
| 5808 | d="m 175.31728,625.5897 393.46659,0.005" | 5812 | d="m 175.31728,625.5897 393.46659,0.005" |
| 5809 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /></g></g></svg> \ No newline at end of file | 5813 | style="fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none" /><path |
| 5814 | inkscape:connector-curvature="0" | ||
| 5815 | id="path27-4-7" | ||
| 5816 | d="m 304.74973,853.92004 a 5.25588,5.25588 0 1 0 -10.51176,0 5.25588,5.25588 0 0 0 10.51176,0 z" | ||
| 5817 | style="display:inline;fill:none;stroke:#0000ff;stroke-width:0.03543307;stroke-linecap:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" /></g></g></svg> \ No newline at end of file | ||
diff --git a/keyboards/planck/keymaps/default/Makefile b/keyboards/planck/keymaps/default/Makefile index 267a087ea..17487ebbf 100644 --- a/keyboards/planck/keymaps/default/Makefile +++ b/keyboards/planck/keymaps/default/Makefile | |||
| @@ -10,7 +10,7 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
| 10 | CONSOLE_ENABLE = no # Console for debug(+400) | 10 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 11 | COMMAND_ENABLE = no # Commands for debug and configuration | 11 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 12 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 13 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 13 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality |
| 14 | MIDI_ENABLE = yes # MIDI controls | 14 | MIDI_ENABLE = yes # MIDI controls |
| 15 | AUDIO_ENABLE = yes # Audio output on port C6 | 15 | AUDIO_ENABLE = yes # Audio output on port C6 |
| 16 | UNICODE_ENABLE = no # Unicode | 16 | UNICODE_ENABLE = no # Unicode |
diff --git a/keyboards/planck/keymaps/priyadi/Makefile b/keyboards/planck/keymaps/priyadi/Makefile index f113f496c..d9d4f3d1d 100644 --- a/keyboards/planck/keymaps/priyadi/Makefile +++ b/keyboards/planck/keymaps/priyadi/Makefile | |||
| @@ -1,8 +1,3 @@ | |||
| 1 | # Please remove if no longer applicable | ||
| 2 | $(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) | ||
| 3 | $(warning Please disable some options in the Makefile to resolve) | ||
| 4 | |||
| 5 | |||
| 6 | # Build Options | 1 | # Build Options |
| 7 | # change to "no" to disable the options, or define them in the Makefile in | 2 | # change to "no" to disable the options, or define them in the Makefile in |
| 8 | # the appropriate keymap folder that will get included automatically | 3 | # the appropriate keymap folder that will get included automatically |
| @@ -11,7 +6,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||
| 11 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) |
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | 7 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) |
| 13 | CONSOLE_ENABLE = no # Console for debug(+400) | 8 | CONSOLE_ENABLE = no # Console for debug(+400) |
| 14 | COMMAND_ENABLE = yes # Commands for debug and configuration | 9 | COMMAND_ENABLE = no # Commands for debug and configuration |
| 15 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 16 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | 11 | BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality |
| 17 | MIDI_ENABLE = no # MIDI controls | 12 | MIDI_ENABLE = no # MIDI controls |
| @@ -20,6 +15,7 @@ UNICODE_ENABLE = no # Unicode | |||
| 20 | UNICODEMAP_ENABLE = yes # Unicode map | 15 | UNICODEMAP_ENABLE = yes # Unicode map |
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 16 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 22 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 17 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
| 18 | API_SYSEX_ENABLE = no | ||
| 23 | 19 | ||
| 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 20 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 21 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
diff --git a/keyboards/planck/keymaps/priyadi/keymap.c b/keyboards/planck/keymaps/priyadi/keymap.c index 6e7f4e735..f0dafebf3 100644 --- a/keyboards/planck/keymaps/priyadi/keymap.c +++ b/keyboards/planck/keymaps/priyadi/keymap.c | |||
| @@ -179,7 +179,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 179 | */ | 179 | */ |
| 180 | [_QWERTY] = { | 180 | [_QWERTY] = { |
| 181 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, | 181 | {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, |
| 182 | {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT }, | 182 | {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT }, |
| 183 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 183 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, |
| 184 | {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} | 184 | {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} |
| 185 | }, | 185 | }, |
| @@ -196,10 +196,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 196 | * `-----------------------------------------------------------------------------------' | 196 | * `-----------------------------------------------------------------------------------' |
| 197 | */ | 197 | */ |
| 198 | [_COLEMAK] = { | 198 | [_COLEMAK] = { |
| 199 | {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, | 199 | {_______, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, _______}, |
| 200 | {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_ENT }, | 200 | {_______, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, _______}, |
| 201 | {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 201 | {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, |
| 202 | {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} | 202 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
| 203 | }, | 203 | }, |
| 204 | 204 | ||
| 205 | /* Workman | 205 | /* Workman |
| @@ -214,10 +214,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
| 214 | * `-----------------------------------------------------------------------------------' | 214 | * `-----------------------------------------------------------------------------------' |
| 215 | */ | 215 | */ |
| 216 | [_WORKMAN] = { | 216 | [_WORKMAN] = { |
| 217 | {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, | 217 | {_______, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_QUOT, _______}, |
| 218 | {KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_ENT }, | 218 | {_______, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, _______}, |
| 219 | {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, | 219 | {_______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_SLSH, _______}, |
| 220 | {KC_LCTL, KC_LGUI, KC_LALT, PUNC, NUM, KC_SPC, KC_SPC, FUNC, EMOJI, KC_RALT, KC_RGUI, KC_RCTL} | 220 | {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} |
| 221 | }, | 221 | }, |
| 222 | 222 | ||
| 223 | /* Punc | 223 | /* Punc |
| @@ -322,6 +322,7 @@ float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); | |||
| 322 | float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); | 322 | float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); |
| 323 | float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); | 323 | float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); |
| 324 | float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); | 324 | float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); |
| 325 | float tone_release[][2] = SONG(MUSICAL_NOTE(_A3, 2)); | ||
| 325 | #endif | 326 | #endif |
| 326 | 327 | ||
| 327 | void persistant_default_layer_set(uint16_t default_layer) { | 328 | void persistant_default_layer_set(uint16_t default_layer) { |
| @@ -331,9 +332,49 @@ void persistant_default_layer_set(uint16_t default_layer) { | |||
| 331 | 332 | ||
| 332 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | 333 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { |
| 333 | // faux clicky | 334 | // faux clicky |
| 334 | if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); | 335 | // if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); |
| 336 | #ifdef AUDIO_ENABLE | ||
| 337 | if (record->event.pressed) { | ||
| 338 | PLAY_NOTE_ARRAY(tone_click, false, 0); | ||
| 339 | } else { | ||
| 340 | PLAY_NOTE_ARRAY(tone_release, false, 0); | ||
| 341 | } | ||
| 342 | #endif | ||
| 335 | 343 | ||
| 336 | switch (keycode) { | 344 | switch (keycode) { |
| 345 | // QWERTZ style comma and dot: semicolon and colon when shifted | ||
| 346 | case KC_COMM: | ||
| 347 | if (record->event.pressed) { | ||
| 348 | bool lshifted = keyboard_report->mods & MOD_BIT(KC_LSFT); | ||
| 349 | bool rshifted = keyboard_report->mods & MOD_BIT(KC_RSFT); | ||
| 350 | if (lshifted || rshifted) { | ||
| 351 | if (lshifted) unregister_code(KC_LSFT); | ||
| 352 | if (rshifted) unregister_code(KC_RSFT); | ||
| 353 | register_code(KC_SCLN); | ||
| 354 | unregister_code(KC_SCLN); | ||
| 355 | if (lshifted) register_code(KC_LSFT); | ||
| 356 | if (rshifted) register_code(KC_RSFT); | ||
| 357 | } else { | ||
| 358 | register_code(KC_COMM); | ||
| 359 | unregister_code(KC_COMM); | ||
| 360 | } | ||
| 361 | } | ||
| 362 | return false; | ||
| 363 | break; | ||
| 364 | case KC_DOT: | ||
| 365 | if (record->event.pressed) { | ||
| 366 | if ((keyboard_report->mods & MOD_BIT(KC_LSFT)) || (keyboard_report->mods & MOD_BIT(KC_RSFT))) { | ||
| 367 | register_code(KC_SCLN); | ||
| 368 | unregister_code(KC_SCLN); | ||
| 369 | } else { | ||
| 370 | register_code(KC_DOT); | ||
| 371 | unregister_code(KC_DOT); | ||
| 372 | } | ||
| 373 | } | ||
| 374 | return false; | ||
| 375 | break; | ||
| 376 | |||
| 377 | // layout switcher | ||
| 337 | case QWERTY: | 378 | case QWERTY: |
| 338 | if (record->event.pressed) { | 379 | if (record->event.pressed) { |
| 339 | #ifdef AUDIO_ENABLE | 380 | #ifdef AUDIO_ENABLE |
| @@ -361,6 +402,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 361 | } | 402 | } |
| 362 | return false; | 403 | return false; |
| 363 | break; | 404 | break; |
| 405 | |||
| 406 | // layer switchers | ||
| 364 | case PUNC: | 407 | case PUNC: |
| 365 | if (record->event.pressed) { | 408 | if (record->event.pressed) { |
| 366 | layer_on(_PUNC); | 409 | layer_on(_PUNC); |
| @@ -397,6 +440,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
| 397 | } | 440 | } |
| 398 | return false; | 441 | return false; |
| 399 | break; | 442 | break; |
| 443 | |||
| 444 | // OS switchers | ||
| 400 | case LINUX: | 445 | case LINUX: |
| 401 | set_unicode_input_mode(UC_LNX); | 446 | set_unicode_input_mode(UC_LNX); |
| 402 | #ifdef AUDIO_ENABLE | 447 | #ifdef AUDIO_ENABLE |
diff --git a/keyboards/planck/keymaps/sgoodwin/Makefile b/keyboards/planck/keymaps/sgoodwin/Makefile index b2ca41944..9081c6d3e 100644 --- a/keyboards/planck/keymaps/sgoodwin/Makefile +++ b/keyboards/planck/keymaps/sgoodwin/Makefile | |||
| @@ -19,6 +19,7 @@ AUDIO_ENABLE = yes # Audio output on port C6 | |||
| 19 | UNICODE_ENABLE = no # Unicode | 19 | UNICODE_ENABLE = no # Unicode |
| 20 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | 20 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 21 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 21 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
| 22 | API_SYSEX_ENABLE = no # Disable extra stuff for ergodoxen | ||
| 22 | 23 | ||
| 23 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | 24 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE |
| 24 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | 25 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend |
diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk index c4ce2aacc..071bfdc7f 100644 --- a/keyboards/preonic/rules.mk +++ b/keyboards/preonic/rules.mk | |||
| @@ -56,11 +56,11 @@ BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | |||
| 56 | MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) | 56 | MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) |
| 57 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | 57 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) |
| 58 | CONSOLE_ENABLE ?= no # Console for debug(+400) | 58 | CONSOLE_ENABLE ?= no # Console for debug(+400) |
| 59 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | 59 | COMMAND_ENABLE ?= no # Commands for debug and configuration |
| 60 | NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | 60 | NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work |
| 61 | BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality | 61 | BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality |
| 62 | MIDI_ENABLE ?= no # MIDI controls | 62 | MIDI_ENABLE ?= yes # MIDI controls |
| 63 | AUDIO_ENABLE ?= no # Audio output on port C6 | 63 | AUDIO_ENABLE ?= yes # Audio output on port C6 |
| 64 | UNICODE_ENABLE ?= no # Unicode | 64 | UNICODE_ENABLE ?= no # Unicode |
| 65 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | 65 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID |
| 66 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | 66 | RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. |
diff --git a/quantum/audio/voices.c b/quantum/audio/voices.c index 6d4172a06..19f7b646e 100644 --- a/quantum/audio/voices.c +++ b/quantum/audio/voices.c | |||
| @@ -18,7 +18,7 @@ void voice_iterate() { | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | void voice_deiterate() { | 20 | void voice_deiterate() { |
| 21 | voice = (voice - 1) % number_of_voices; | 21 | voice = (voice - 1 + number_of_voices) % number_of_voices; |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | float voice_envelope(float frequency) { | 24 | float voice_envelope(float frequency) { |
| @@ -31,6 +31,27 @@ float voice_envelope(float frequency) { | |||
| 31 | polyphony_rate = 0; | 31 | polyphony_rate = 0; |
| 32 | break; | 32 | break; |
| 33 | 33 | ||
| 34 | case something: | ||
| 35 | polyphony_rate = 0; | ||
| 36 | switch (compensated_index) { | ||
| 37 | case 0 ... 9: | ||
| 38 | note_timbre = TIMBRE_12; | ||
| 39 | break; | ||
| 40 | |||
| 41 | case 10 ... 19: | ||
| 42 | note_timbre = TIMBRE_25; | ||
| 43 | break; | ||
| 44 | |||
| 45 | case 20 ... 200: | ||
| 46 | note_timbre = .25 + .125 + pow(((float)compensated_index - 20) / (200 - 20), 2)*.125; | ||
| 47 | break; | ||
| 48 | |||
| 49 | default: | ||
| 50 | note_timbre = .25; | ||
| 51 | break; | ||
| 52 | } | ||
| 53 | break; | ||
| 54 | |||
| 34 | case butts_fader: | 55 | case butts_fader: |
| 35 | polyphony_rate = 0; | 56 | polyphony_rate = 0; |
| 36 | switch (compensated_index) { | 57 | switch (compensated_index) { |
diff --git a/quantum/audio/voices.h b/quantum/audio/voices.h index b2495b23b..b43def3d7 100644 --- a/quantum/audio/voices.h +++ b/quantum/audio/voices.h | |||
| @@ -11,6 +11,7 @@ float voice_envelope(float frequency); | |||
| 11 | 11 | ||
| 12 | typedef enum { | 12 | typedef enum { |
| 13 | default_voice, | 13 | default_voice, |
| 14 | something, | ||
| 14 | butts_fader, | 15 | butts_fader, |
| 15 | octave_crunch, | 16 | octave_crunch, |
| 16 | duty_osc, | 17 | duty_osc, |
diff --git a/quantum/process_keycode/process_music.c b/quantum/process_keycode/process_music.c index 2d52e47a7..bae43943e 100644 --- a/quantum/process_keycode/process_music.c +++ b/quantum/process_keycode/process_music.c | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #include "process_music.h" | 1 | #include "process_music.h" |
| 2 | 2 | ||
| 3 | bool music_activated = false; | 3 | bool music_activated = false; |
| 4 | uint8_t starting_note = 0x0C; | 4 | uint8_t music_starting_note = 0x0C; |
| 5 | int offset = 7; | 5 | int music_offset = 7; |
| 6 | 6 | ||
| 7 | // music sequencer | 7 | // music sequencer |
| 8 | static bool music_sequence_recording = false; | 8 | static bool music_sequence_recording = false; |
| @@ -115,7 +115,7 @@ bool process_music(uint16_t keycode, keyrecord_t *record) { | |||
| 115 | return false; | 115 | return false; |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(starting_note + SCALE[record->event.key.col + offset])/12.0+(MATRIX_ROWS - record->event.key.row)); | 118 | float freq = ((float)220.0)*pow(2.0, -5.0)*pow(2.0,(music_starting_note + SCALE[record->event.key.col + music_offset])/12.0+(MATRIX_ROWS - record->event.key.row)); |
| 119 | if (record->event.pressed) { | 119 | if (record->event.pressed) { |
| 120 | play_note(freq, 0xF); | 120 | play_note(freq, 0xF); |
| 121 | if (music_sequence_recording) { | 121 | if (music_sequence_recording) { |
diff --git a/tmk_core/avr.mk b/tmk_core/avr.mk index b48173341..5df539def 100644 --- a/tmk_core/avr.mk +++ b/tmk_core/avr.mk | |||
| @@ -26,7 +26,7 @@ CFLAGS += -fno-inline-small-functions | |||
| 26 | CFLAGS += -fno-strict-aliasing | 26 | CFLAGS += -fno-strict-aliasing |
| 27 | 27 | ||
| 28 | CPPFLAGS += $(COMPILEFLAGS) | 28 | CPPFLAGS += $(COMPILEFLAGS) |
| 29 | CPPFLAGS += -fno-exceptions | 29 | CPPFLAGS += -fno-exceptions -std=c++11 |
| 30 | 30 | ||
| 31 | LDFLAGS +=-Wl,--gc-sections | 31 | LDFLAGS +=-Wl,--gc-sections |
| 32 | 32 | ||
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index 37194e77a..fd6edd42c 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp | |||
| @@ -86,7 +86,7 @@ struct queue_item { | |||
| 86 | 86 | ||
| 87 | uint16_t consumer; | 87 | uint16_t consumer; |
| 88 | struct __attribute__((packed)) { | 88 | struct __attribute__((packed)) { |
| 89 | uint8_t x, y, scroll, pan; | 89 | int8_t x, y, scroll, pan; |
| 90 | } mousemove; | 90 | } mousemove; |
| 91 | }; | 91 | }; |
| 92 | }; | 92 | }; |
diff --git a/tmk_core/protocol/lufa/descriptor.c b/tmk_core/protocol/lufa/descriptor.c index bf47787d2..14d99b50b 100644 --- a/tmk_core/protocol/lufa/descriptor.c +++ b/tmk_core/protocol/lufa/descriptor.c | |||
| @@ -40,6 +40,9 @@ | |||
| 40 | #include "report.h" | 40 | #include "report.h" |
| 41 | #include "descriptor.h" | 41 | #include "descriptor.h" |
| 42 | 42 | ||
| 43 | #ifndef USB_MAX_POWER_CONSUMPTION | ||
| 44 | #define USB_MAX_POWER_CONSUMPTION 500 | ||
| 45 | #endif | ||
| 43 | 46 | ||
| 44 | /******************************************************************************* | 47 | /******************************************************************************* |
| 45 | * HID Report Descriptors | 48 | * HID Report Descriptors |
| @@ -294,7 +297,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = | |||
| 294 | 297 | ||
| 295 | .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), | 298 | .ConfigAttributes = (USB_CONFIG_ATTR_RESERVED | USB_CONFIG_ATTR_REMOTEWAKEUP), |
| 296 | 299 | ||
| 297 | .MaxPowerConsumption = USB_CONFIG_POWER_MA(500) | 300 | .MaxPowerConsumption = USB_CONFIG_POWER_MA(USB_MAX_POWER_CONSUMPTION) |
| 298 | }, | 301 | }, |
| 299 | 302 | ||
| 300 | /* | 303 | /* |
