diff options
author | lokher <lokher@gmail.com> | 2022-12-06 17:10:48 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-12-07 15:50:49 +0800 |
commit | a336c2c5005251e4cb0f3a62ccabdb4cfccad915 (patch) | |
tree | 3c948b631a5e3b6f940dabe02fad3c7487e6f350 /keyboards/handwired/arrow_pad/keymaps/pad_21 | |
parent | 27fc28fd2ff52e079a5bc58d6aaea4c752420615 (diff) |
Merge upstream master to 2022 Q4 breaking change
Diffstat (limited to 'keyboards/handwired/arrow_pad/keymaps/pad_21')
-rw-r--r-- | keyboards/handwired/arrow_pad/keymaps/pad_21/config.h | 39 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c | 119 | ||||
-rw-r--r-- | keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk | 12 |
3 files changed, 0 insertions, 170 deletions
diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h deleted file mode 100644 index 0bff14a28d..0000000000 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#pragma once - -#undef VENDOR_ID -#undef PRODUCT_ID -#undef DEVICE_VER -#undef MANUFACTURER -#undef PRODUCT -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4097 -#define DEVICE_VER 0x0001 -#define MANUFACTURER "Nobody" -#define PRODUCT "Arrow Pad 21" - -#undef MATRIX_ROWS -#undef MATRIX_COLS -#define MATRIX_ROWS 2 -#define MATRIX_COLS 11 - -#undef MATRIX_ROW_PINS -#undef MATRIX_COL_PINS -#define MATRIX_ROW_PINS { D3, D5 } -#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 } diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c b/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c deleted file mode 100644 index bc940420fe..0000000000 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/keymap.c +++ /dev/null @@ -1,119 +0,0 @@ - -#include QMK_KEYBOARD_H -#include "led.h" - -enum layers { - LAYER_BASE, - LAYER_EDIT, - LAYER_FUNCTION -}; - -enum custom_keycodes { - M_COPY = SAFE_RANGE, // KC_FN5: MACRO_COPY_CUT - M_SHFCT, // KC_FN6: MACRO_SHIFT_CONTROL - M_CTALT // KC_FN7: MACRO_CONTROL_ALT -}; - -#define SC_UNDO LCTL(KC_Z) -#define SC_REDO LCTL(KC_Y) -#define SC_CUT LCTL(KC_X) -#define SC_COPY LCTL(KC_C) -#define SC_PSTE LCTL(KC_V) -#define SC_SELA LCTL(KC_A) -#define SC_SAVE LCTL(KC_S) -#define SC_OPEN LCTL(KC_O) -#define SC_ACLS LALT(KC_F4) -#define SC_CCLS LCTL(KC_F4) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -[LAYER_BASE] = LAYOUT_pad21( - KC_ESC, KC_TAB, KC_BSLS, MO(2), - KC_NUM, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, - KC_P4, KC_P5, KC_P6, KC_PPLS, - KC_P1, KC_P2, KC_P3, - KC_P0, KC_PDOT, KC_PENT ), - -[LAYER_EDIT] = LAYOUT_pad21( - KC_ESC, KC_TAB, KC_SPC, _______, - TG(1), SC_PSTE, SC_REDO, SC_UNDO, - KC_HOME, KC_UP, KC_PGUP, - KC_LEFT, M_COPY, KC_RGHT, M_CTALT, - KC_END, KC_DOWN, KC_PGDN, - KC_BSPC, KC_DEL, M_SHFCT), - -[LAYER_FUNCTION] = LAYOUT_pad21( - BL_TOGG, BL_UP, BL_DOWN, _______, - TG(1), _______, _______, _______, - _______, _______, _______, - _______, _______, _______, _______, - _______, _______, _______, - QK_BOOT, _______, _______ ), - -}; - - -bool process_record_user(uint16_t keycode, keyrecord_t * record) { - // MACRODOWN only works in this function - switch (keycode) { - - case M_COPY: - if (record->event.pressed) { - register_code(KC_LCTL); - if (record->tap.count == 1) { - register_code(KC_C); - unregister_code(KC_C); - } else if (record->tap.count == 2) { - register_code(KC_X); - unregister_code(KC_X); - } - unregister_code(KC_LCTL); - } - break; - - case M_SHFCT: - if (record->event.pressed) { - if (record->tap.count <= 2) register_mods(MOD_BIT(KC_LSFT)); - if (record->tap.count == 2) register_mods(MOD_BIT(KC_LCTL)); - if (record->tap.count == 3) register_code(KC_PENT);; - } else { - unregister_mods(MOD_BIT(KC_LSFT) | MOD_BIT(KC_LCTL)); - unregister_code(KC_PENT); - } - break; - - case M_CTALT: - if (record->event.pressed) { - if (record->tap.count < 2) register_mods(MOD_BIT(KC_LCTL)); - if (record->tap.count >= 2) register_mods(MOD_BIT(KC_LALT)); - } else { - unregister_mods(MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); - } - break; - } - - return true; -} - -void led_set_user(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - // output high - DDRD |= (1<<6); - PORTD |= (1<<6); - } else { - // Hi-Z - DDRD &= ~(1<<6); - PORTD &= ~(1<<6); - } - if (usb_led & (1<<USB_LED_NUM_LOCK)) { - // output low - DDRC |= (1<<7); - PORTC |= ~(1<<7); - } else { - // Hi-Z - DDRC &= ~(1<<7); - PORTC &= ~(1<<7); - } -} diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk deleted file mode 100644 index d3e5864916..0000000000 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk +++ /dev/null @@ -1,12 +0,0 @@ -BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |