diff options
author | DangerousParts <DangerousParts@gmail.com> | 2017-10-31 20:59:23 -0700 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2017-10-31 23:59:23 -0400 |
commit | 20e18d15e3173e342336d99ee0f7ed76392af190 (patch) | |
tree | 40d52bf95fde6cdd05ca2e755582ae1154e3b598 /keyboards/kona_classic | |
parent | 83af62322cfe8cbe23f404ec5fa857679dc44cea (diff) |
Created Kona Classic config (#1791)
* Created Kona Classic config
* Fixed KonaClassic config
* Updated README
* Updated Readme to conform to format standards
* Added ANSI and ISO layout options
* Fixed images in Readme
* Added labels to images
* Added absolute links to images in Readme
* Image link updates again
* Fixed bottom row keys in some layouts
* Fixed Grave and Tilde
* Fixed Underglow in Kona Classic configs
* Renamed KonaClassic to kona_classic
Diffstat (limited to 'keyboards/kona_classic')
32 files changed, 1811 insertions, 0 deletions
diff --git a/keyboards/kona_classic/README.md b/keyboards/kona_classic/README.md new file mode 100644 index 0000000000..5821e05629 --- /dev/null +++ b/keyboards/kona_classic/README.md @@ -0,0 +1,47 @@ +Kona Classic +=== + +![Kona Classic](http://i.imgur.com/7twIpuB.jpg) + + +The Kona Classic is a 60% layout + left Function keys. Using a Teensy as the controller, the Kona Classic is provided as a do-it-yourself kit for left f-key enthusiasts. + +Keyboard Maintainer: [Maximillian Hill](https://github.com/DangerousParts) +Hardware Supported: Teensy 2.0 +Hardware Availability: Via GB + +Layouts that are preconfigured are shown here: + +Default: +![Default](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/default.png) + +ANSI: +![ANSI](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/ansi.png) + +ANSI_split: +![ANSI w/ Split Space](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/ansi_split.png) + +ANSI_arrows: +![ANSI w/ Arrows](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/ansi_arrows.png) + +ANSI_split_arrows: +![ANSI w/ Split Space & Arrows](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/ansi_split_arrows.png) + +ISO: +![ISO](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/iso.png) + +ISO_split: +![ISO w/ Split Space](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/iso_split.png) + +ISO_arrows: +![ISO w/ Arrows](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/iso_arrows.png) + +ISO_split_arrows: +![ISO w/ Split Space & Arrows](https://github.com/DangerousParts/KonaClassic/blob/master/QMKFirmware/layout_images/iso_split_arrows.png) + + +Make example for this keyboard (after setting up your build environment): + + make KonaClassic-default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
\ No newline at end of file diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h new file mode 100644 index 0000000000..fecf64c041 --- /dev/null +++ b/keyboards/kona_classic/config.h @@ -0,0 +1,186 @@ +/* +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/>. +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Dangerous Parts +#define PRODUCT Kona Classic +#define DESCRIPTION QMK keyboard firmware for Kona Classic + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +*/ +#define MATRIX_ROW_PINS { F1, F5, F6, F7, B6 } +/* Column pin configuration + */ +#define MATRIX_COL_PINS { F0, F4, B5, B4, D7, D6, B0, B1, B3, D2, B7, D0, D1, D3, C6, C7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Underlight configuration + */ +#define RGB_DI_PIN B2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#endif diff --git a/keyboards/kona_classic/keymaps/ansi/config.h b/keyboards/kona_classic/keymaps/ansi/config.h new file mode 100644 index 0000000000..a3828f7d5d --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c new file mode 100644 index 0000000000..fd3a8c6b27 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ +#include "kona_classic.h" + +#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + +// Helpful defines +#define ______ KC_TRNS +#define XXXXXX KC_NO + +#define _DEFAULT 0 +#define _FN 1 + +//RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT] = KEYMAP( + 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, \ + 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, \ + KC_F5, KC_F6, 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_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_RSFT, ______, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, ______, KC_SPC, ______, KC_LALT, KC_RGUI, ______, MO(_FN), KC_RCTL + ), + [_FN] = KEYMAP( + RGB_TOG, RGB_MOD, KC_TILD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_HUI, RGB_HUD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ) +}; + +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +enum function_id { + ESCAPE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(ESCAPE), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case ESCAPE: + shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/kona_classic/keymaps/ansi/rules.mk b/keyboards/kona_classic/keymaps/ansi/rules.mk new file mode 100644 index 0000000000..38c23a1b89 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi/rules.mk @@ -0,0 +1,37 @@ +# Copyright 2013 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/>. + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/config.h b/keyboards/kona_classic/keymaps/ansi_arrows/config.h new file mode 100644 index 0000000000..a3828f7d5d --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c new file mode 100644 index 0000000000..00bb172063 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ +#include "kona_classic.h" + +#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + +// Helpful defines +#define ______ KC_TRNS +#define XXXXXX KC_NO + +#define _DEFAULT 0 +#define _FN 1 + +//RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT] = KEYMAP( + 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, \ + 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, \ + KC_F5, KC_F6, 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_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), \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, ______, KC_SPC, ______, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [_FN] = KEYMAP( + RGB_TOG, RGB_MOD, KC_TILD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_HUI, RGB_HUD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ) +}; + +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +enum function_id { + ESCAPE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(ESCAPE), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case ESCAPE: + shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk new file mode 100644 index 0000000000..38c23a1b89 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_arrows/rules.mk @@ -0,0 +1,37 @@ +# Copyright 2013 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/>. + + +# QMK Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/kona_classic/keymaps/ansi_split/config.h b/keyboards/kona_classic/keymaps/ansi_split/config.h new file mode 100644 index 0000000000..a3828f7d5d --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_split/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c new file mode 100644 index 0000000000..bbd2067670 --- /dev/null +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -0,0 +1,98 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * 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/>. + */ +#include "kona_classic.h" + +#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) + +// Helpful defines +#define ______ KC_TRNS +#define XXXXXX KC_NO + +#define _DEFAULT 0 +#define _FN 1 + +//RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_DEFAULT] = KEYMAP( + 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, \ + 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, \ + KC_F5, KC_F6, 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_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_RSFT, ______, \ + KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_ENT, MO(_FN), KC_SPC, KC_LALT, KC_RGUI, ______, MO(_FN), KC_RCTL + ), + [_FN] = KEYMAP( + RGB_TOG, RGB_MOD, KC_TILD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_HUI, RGB_HUD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______ + ) +}; + +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; + + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +enum function_id { + ESCAPE, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(ESCAPE), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case ESCAPE: + shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); |