From fa96122bece28c49a508a40d70967f4d1fd9f147 Mon Sep 17 00:00:00 2001 From: "jt.mchorse" Date: Wed, 26 Jul 2017 14:35:33 -0700 Subject: [PATCH 1/2] keymap for f keys --- keyboards/obelus/keymaps/jtm_sea/Makefile | 21 ++++ keyboards/obelus/keymaps/jtm_sea/config.h | 8 ++ keyboards/obelus/keymaps/jtm_sea/keymap.c | 123 +++++++++++++++++++++ keyboards/obelus/keymaps/jtm_sea/readme.md | 1 + 4 files changed, 153 insertions(+) create mode 100644 keyboards/obelus/keymaps/jtm_sea/Makefile create mode 100644 keyboards/obelus/keymaps/jtm_sea/config.h create mode 100644 keyboards/obelus/keymaps/jtm_sea/keymap.c create mode 100644 keyboards/obelus/keymaps/jtm_sea/readme.md diff --git a/keyboards/obelus/keymaps/jtm_sea/Makefile b/keyboards/obelus/keymaps/jtm_sea/Makefile new file mode 100644 index 000000000000..c040297c7a8c --- /dev/null +++ b/keyboards/obelus/keymaps/jtm_sea/Makefile @@ -0,0 +1,21 @@ +# 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 = no # 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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # 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. 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/obelus/keymaps/jtm_sea/config.h b/keyboards/obelus/keymaps/jtm_sea/config.h new file mode 100644 index 000000000000..df06a2620627 --- /dev/null +++ b/keyboards/obelus/keymaps/jtm_sea/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/obelus/keymaps/jtm_sea/keymap.c b/keyboards/obelus/keymaps/jtm_sea/keymap.c new file mode 100644 index 000000000000..23e9adc5779e --- /dev/null +++ b/keyboards/obelus/keymaps/jtm_sea/keymap.c @@ -0,0 +1,123 @@ +#include "obelus.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------. + * | 7 | 8 | 9 | * | + * |-----+-----+-----+-----| + * | 4 | 5 | 6 | - | + * |-----+-----+-----+-----| + * | 1 | 2 | 3 | + | + * |-----+-----+-----+-----| + * | 0 | . | / | = | + * `---------------------- ' + */ + +[0] = KEYMAP( /* Base */ + KC_0, KC_DOT, KC_SLSH, KC_EQL,\ + KC_F9, KC_F10, KC_F11, KC_F12, \ + KC_F5, KC_F6, KC_F7, KC_F8, \ + KC_F1, KC_F2, KC_F3, KC_F4 \ +), +}; + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); +#endif + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +#endif diff --git a/keyboards/obelus/keymaps/jtm_sea/readme.md b/keyboards/obelus/keymaps/jtm_sea/readme.md new file mode 100644 index 000000000000..bac51fc043c1 --- /dev/null +++ b/keyboards/obelus/keymaps/jtm_sea/readme.md @@ -0,0 +1 @@ +# The default keymap for obelus \ No newline at end of file From c8b9fbfc2ef991810839743be7b01a5164042d5a Mon Sep 17 00:00:00 2001 From: "jt.mchorse" Date: Wed, 26 Jul 2017 14:48:44 -0700 Subject: [PATCH 2/2] updated awesome ascii keeb layout --- keyboards/obelus/keymaps/jtm_sea/keymap.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/keyboards/obelus/keymaps/jtm_sea/keymap.c b/keyboards/obelus/keymaps/jtm_sea/keymap.c index 23e9adc5779e..0739906858b7 100644 --- a/keyboards/obelus/keymaps/jtm_sea/keymap.c +++ b/keyboards/obelus/keymaps/jtm_sea/keymap.c @@ -39,19 +39,21 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Qwerty * ,-----------------------. - * | 7 | 8 | 9 | * | + * | 0 | . | / | = | * |-----+-----+-----+-----| - * | 4 | 5 | 6 | - | + * | F9 | F10 | F11 | F12 | * |-----+-----+-----+-----| - * | 1 | 2 | 3 | + | + * | F5 | F6 | F7 | F8 | * |-----+-----+-----+-----| - * | 0 | . | / | = | + * | F1 | F2 | F3 | F4 | * `---------------------- ' */ [0] = KEYMAP( /* Base */ + //update top row as needed KC_0, KC_DOT, KC_SLSH, KC_EQL,\ KC_F9, KC_F10, KC_F11, KC_F12, \ KC_F5, KC_F6, KC_F7, KC_F8, \