diff options
Diffstat (limited to 'keyboards/kona_classic')
3 files changed, 159 insertions, 0 deletions
diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/config.h b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/config.h new file mode 100644 index 000000000..a3828f7d5 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/config.h | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #ifndef CONFIG_USER_H | ||
| 18 | #define CONFIG_USER_H | ||
| 19 | |||
| 20 | #include "../../config.h" | ||
| 21 | |||
| 22 | // place overrides here | ||
| 23 | |||
| 24 | #endif | ||
diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c new file mode 100644 index 000000000..c11f14305 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | /* Copyright 2017 Mathias Andersson <wraul@dbox.se> | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | #include "kona_classic.h" | ||
| 17 | |||
| 18 | #define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 19 | #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) | ||
| 20 | |||
| 21 | // Helpful defines | ||
| 22 | #define ______ KC_TRNS | ||
| 23 | #define XXXXXX KC_NO | ||
| 24 | |||
| 25 | #define _DEFAULT 0 | ||
| 26 | #define _FN 1 | ||
| 27 | |||
| 28 | //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD | ||
| 29 | |||
| 30 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 31 | [_DEFAULT] = KEYMAP( | ||
| 32 | KC_F1, KC_F2, F(0), 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, \ | ||
| 33 | KC_F3, KC_F4, 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, \ | ||
| 34 | KC_F5, KC_F6, KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, ______, \ | ||
| 35 | KC_F7, KC_F8, KC_LSFT, ______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ | ||
| 36 | KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, ______, KC_SPC, ______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | ||
| 37 | ), | ||
| 38 | [_FN] = KEYMAP( | ||
| 39 | RGB_TOG, RGB_MOD, KC_TILD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ | ||
| 40 | ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 41 | RGB_HUI, RGB_HUD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 42 | RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ | ||
| 43 | RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ | ||
| 44 | ) | ||
| 45 | }; | ||
| 46 | |||
| 47 | // const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; | ||
| 48 | |||
| 49 | |||
| 50 | void matrix_init_user(void) { | ||
| 51 | |||
| 52 | } | ||
| 53 | |||
| 54 | void matrix_scan_user(void) { | ||
| 55 | |||
| 56 | } | ||
| 57 | |||
| 58 | bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
| 59 | return true; | ||
| 60 | } | ||
| 61 | |||
| 62 | void led_set_user(uint8_t usb_led) { | ||
| 63 | |||
| 64 | } | ||
| 65 | |||
| 66 | enum function_id { | ||
| 67 | ESCAPE, | ||
| 68 | }; | ||
| 69 | |||
| 70 | const uint16_t PROGMEM fn_actions[] = { | ||
| 71 | [0] = ACTION_FUNCTION(ESCAPE), | ||
| 72 | }; | ||
| 73 | |||
| 74 | void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { | ||
| 75 | static uint8_t shift_esc_shift_mask; | ||
| 76 | switch (id) { | ||
| 77 | case ESCAPE: | ||
| 78 | shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; | ||
| 79 | if (record->event.pressed) { | ||
| 80 | if (shift_esc_shift_mask) { | ||
| 81 | add_key(KC_GRV); | ||
| 82 | send_keyboard_report(); | ||
| 83 | } else { | ||
| 84 | add_key(KC_ESC); | ||
| 85 | send_keyboard_report(); | ||
| 86 | } | ||
| 87 | } else { | ||
| 88 | if (shift_esc_shift_mask) { | ||
| 89 | del_key(KC_GRV); | ||
| 90 | send_keyboard_report(); | ||
| 91 | } else { | ||
| 92 | del_key(KC_ESC); | ||
| 93 | send_keyboard_report(); | ||
| 94 | } | ||
| 95 | } | ||
| 96 | break; | ||
| 97 | } | ||
| 98 | } | ||
diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk new file mode 100644 index 000000000..38c23a1b8 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/rules.mk | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | # Copyright 2013 Jun Wako <wakojun@gmail.com> | ||
| 2 | # | ||
| 3 | # This program is free software: you can redistribute it and/or modify | ||
| 4 | # it under the terms of the GNU General Public License as published by | ||
| 5 | # the Free Software Foundation, either version 2 of the License, or | ||
| 6 | # (at your option) any later version. | ||
| 7 | # | ||
| 8 | # This program is distributed in the hope that it will be useful, | ||
| 9 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | # GNU General Public License for more details. | ||
| 12 | # | ||
| 13 | # You should have received a copy of the GNU General Public License | ||
| 14 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | |||
| 16 | |||
| 17 | # QMK Build Options | ||
| 18 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 19 | # the appropriate keymap folder that will get included automatically | ||
| 20 | # | ||
| 21 | BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) | ||
| 22 | MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | ||
| 23 | EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | ||
| 24 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 25 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 26 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 27 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 28 | MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | ||
| 29 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 30 | UNICODE_ENABLE = no # Unicode | ||
| 31 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 32 | RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 33 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 34 | |||
| 35 | ifndef QUANTUM_DIR | ||
| 36 | include ../../../../Makefile | ||
| 37 | endif | ||
