From 3909d175861debd1f49884e94612e801a4c85a7d Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Sat, 15 Oct 2022 18:59:11 +0100 Subject: [PATCH 1/7] [Keymap] Add personal keymap for Lily58 --- keyboards/lily58/keymaps/oldfieldtc/README.md | 37 ++++ keyboards/lily58/keymaps/oldfieldtc/config.h | 50 +++++ keyboards/lily58/keymaps/oldfieldtc/keymap.c | 203 ++++++++++++++++++ keyboards/lily58/keymaps/oldfieldtc/rules.mk | 32 +++ 4 files changed, 322 insertions(+) create mode 100644 keyboards/lily58/keymaps/oldfieldtc/README.md create mode 100644 keyboards/lily58/keymaps/oldfieldtc/config.h create mode 100644 keyboards/lily58/keymaps/oldfieldtc/keymap.c create mode 100644 keyboards/lily58/keymaps/oldfieldtc/rules.mk diff --git a/keyboards/lily58/keymaps/oldfieldtc/README.md b/keyboards/lily58/keymaps/oldfieldtc/README.md new file mode 100644 index 000000000000..19df47034c16 --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/README.md @@ -0,0 +1,37 @@ +# Lily58 keyboard keymap + +## Getting started +- [Set up the QMK environment](https://docs.qmk.fm/#/newbs_getting_started) + - [Install QMK Toolbox](https://github.com/qmk/qmk_toolbox) + - [Install QMK MSYS](https://github.com/qmk/qmk_distro_msys/releases/latest) +- Update `keymap.c` in `keyboards/lily58/keymaps/oldfieldtc`. +- Set the following user configs + - `qmk config user.keyboard=lily58/rev1` + - `qmk config user.keymap=oldfieldtc` +- Run `qmk compile -kb lily58/rev1 -km oldfieldtc` +- Once compiled, open QMK Toolbox and open the `lily58_rev1_oldfieldtc.hex` file that is found at the root of the `qmk_firmware` directory. +- Disconnect one keyboard half and press the reset button on the half that is connected. A `Atmel DFU device connected (libusb0): Atmel Corp. ATmega32U4 (03EB:2FF4:0000)` notice should appear in the window. +- Press 'Flash' and the keyboard should be flashed. +- Disconnect that keyboard half and repeat the previous two steps with the other half. +- Connect both halves together and the keyboard should now be flashed with the new keymap. + +## Default layer +![Default keymap layer](https://user-images.githubusercontent.com/9656588/195990181-0f33ef49-0010-482c-bea8-fa84190cdf58.jpg) + +[Default layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/8ff6160c16e9b9ee7e104538bfad4a59) + +## Lower layer +![Lower keymap layer](https://user-images.githubusercontent.com/9656588/195990663-cae90d7a-988c-4230-a52b-8c70e0289443.jpg) + +[Lower layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/7d77cd87c53d5eded50530242b852c20) + +## Raise layer +![Raise keymap layer](https://user-images.githubusercontent.com/9656588/195990956-7ff1b698-7f76-452a-ae12-c5de638563a8.jpg) + +[Raise layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/c7a63881a13e339f1b5b847637677e5f) + +## Adjust layer +![Adjust keymap layer](https://user-images.githubusercontent.com/9656588/195991198-a00247ed-4c24-4a7e-852e-46f61d80bf6f.jpg) + +[Adjust layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/15a25bc84fa69a1b9f228574674728d3) + diff --git a/keyboards/lily58/keymaps/oldfieldtc/config.h b/keyboards/lily58/keymaps/oldfieldtc/config.h new file mode 100644 index 000000000000..6b9e52c05ee0 --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/config.h @@ -0,0 +1,50 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert + +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 . +*/ + +#pragma once + +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define USE_SERIAL_PD2 + +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +// Underglow +/* +#undef RGBLED_NUM +#define RGBLED_NUM 14 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +*/ diff --git a/keyboards/lily58/keymaps/oldfieldtc/keymap.c b/keyboards/lily58/keymaps/oldfieldtc/keymap.c new file mode 100644 index 000000000000..44ef15f56feb --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/keymap.c @@ -0,0 +1,203 @@ +#include QMK_KEYBOARD_H + +#ifdef PROTOCOL_LUFA + #include "lufa.h" + #include "split_util.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif +#ifdef WPM_ENABLE + #include "wpm.h" +#endif + +extern uint8_t is_master; + +enum layer_number { + _QWERTY = 0, + _LOWER, + _RAISE, + _ADJUST, +}; + +void render_logo(void); + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |BackSP| + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |LCTRL | A | S | D | F | G |-------. ,-------| H | J | K | L | ; | ' | + * |------+------+------+------+------+------| [ | | ] |------+------+------+------+------+------| + * |LShift| Z | X | C | V | B |-------| |-------| N | M | , | . | / |RShift| + * `-----------------------------------------/ / \ \-----------------------------------------' + * |LAlt/⌥|LGUI/⌘|LOWER| /Space / \Enter \ |RAISE | Play |RGUI/⌘ | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + + [_QWERTY] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_ENT, MO(2), KC_MPLY, KC_RGUI +), + +/* LOWER + * ,-----------------------------------------. ,-----------------------------------------. + * | Mute |Vol - |Vol + | Play | Rwd | Fwd | | | | | | | DEL | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | ! | @ | # | $ | % |-------. ,-------| ^ | & | * | ( | ) | ~ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | Caps | | | | | |-------| |-------| | _ | + | { | } | |\ | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ +[_LOWER] = LAYOUT( + KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MRWD, KC_MFFD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + 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_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NONUS_HASH, + KC_CAPS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NONUS_BACKSLASH, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO +), + +/* RAISE + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | F1 | F2 | F3 | F4 | F5 | F6 |-------. ,-------| | Left | Down | Up |Right | | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | F7 | F8 | F9 | F10 | F11 | F12 |-------| |-------| + | - | = | [ | ] | # | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + +[_RAISE] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_NO, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_PLUS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO + ), + +/* ADJUST + * ,-----------------------------------------. ,-----------------------------------------. + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | |-------. ,-------| | |RGB ON| HUE+ | SAT+ | VAL+ | + * |------+------+------+------+------+------| | | |------+------+------+------+------+------| + * | | | | | | |-------| |-------| | | MODE | HUE- | SAT- | VAL- | + * `-----------------------------------------/ / \ \-----------------------------------------' + * | | |LOWER | / / \ \ |RAISE | | | + * | | | |/ / \ \ | | | | + * `----------------------------' '------''--------------------' + */ + [_ADJUST] = LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, + KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO) + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +//SSD1306 OLED update loop, make sure to enable OLED_ENABLE=yes in rules.mk +#ifdef OLED_ENABLE + +oled_rotation_t oled_init_user(oled_rotation_t rotation) { + if (!is_keyboard_master()) + return OLED_ROTATION_180; // flips the display 180 degrees if offhand + return rotation; +} + +// When you add source files to SRC in rules.mk, you can use functions. +const char *read_layer_state(void); +const char *read_logo(void); +void set_keylog(uint16_t keycode, keyrecord_t *record); +const char *read_keylog(void); +const char *read_keylogs(void); + +char wpm_str[10]; + +bool oled_task_user(void) { + if (is_keyboard_master()) { + // If you want to change the display of OLED, you need to change here + oled_write_ln(read_layer_state(), false); + oled_write_ln(read_keylog(), false); + oled_write_ln(read_keylogs(), false); + + sprintf(wpm_str, "WPM: %03d", get_current_wpm()); + oled_write_ln(wpm_str, false); + } else { + render_logo(); + } + return false; +} +#endif // OLED_ENABLE + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { +#ifdef OLED_ENABLE + set_keylog(keycode, record); +#endif + + } + return true; +} + +void render_logo(void) { + static const char PROGMEM my_logo[] = { + // 'punpun 2', 128x32px + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x80, 0xe0, 0x70, 0x38, 0x1c, 0x0c, 0x06, 0x06, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, +0x02, 0x02, 0x02, 0x06, 0x06, 0x06, 0x04, 0x04, 0x0c, 0x0c, 0x08, 0x08, 0x18, 0x18, 0x18, 0x10, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x3f, 0xff, 0xc0, 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x1c, 0x18, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x03, 0x07, 0x0c, 0x18, 0x10, 0xf0, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x00, +0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x70, 0x38, 0x1c, 0x06, 0x03, +0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x03, 0x03, 0x02, 0x06, 0x04, 0x04, 0x0c, 0x08, 0x18, 0x18 + }; + oled_write_raw_P(my_logo, sizeof(my_logo)); +} \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/rules.mk b/keyboards/lily58/keymaps/oldfieldtc/rules.mk new file mode 100644 index 000000000000..26fc66da4ec5 --- /dev/null +++ b/keyboards/lily58/keymaps/oldfieldtc/rules.mk @@ -0,0 +1,32 @@ +# 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 +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = no # 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 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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing +OLED_ENABLE= yes # OLED display +OLED_DRIVER = SSD1306 +WPM_ENABLE = yes # Words per minute calculation + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +# If you want to change the display of OLED, you need to change here +SRC += ./lib/rgb_state_reader.c \ + ./lib/layer_state_reader.c \ + ./lib/logo_reader.c \ + ./lib/keylogger.c \ + ./lib/timelogger.c \ + # ./lib/mode_icon_reader.c \ + # ./lib/host_led_state_reader.c \ From 2de144706edbb99ea9a03e5661fa10c2c3eeb2a7 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Sun, 16 Oct 2022 11:21:37 +0100 Subject: [PATCH 2/7] Updated copyright headers and removed RGB config definitions --- keyboards/lily58/keymaps/oldfieldtc/config.h | 21 ++------------------ keyboards/lily58/keymaps/oldfieldtc/keymap.c | 3 +++ 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/keyboards/lily58/keymaps/oldfieldtc/config.h b/keyboards/lily58/keymaps/oldfieldtc/config.h index 6b9e52c05ee0..ebe16a24b455 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/config.h +++ b/keyboards/lily58/keymaps/oldfieldtc/config.h @@ -1,8 +1,7 @@ /* This is the c configuration file for the keymap -Copyright 2012 Jun Wako -Copyright 2015 Jack Humbert +Copyright 2022 Tommy Oldfield <@oldfieldtc> 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 @@ -31,20 +30,4 @@ along with this program. If not, see . #define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100 - -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 27 -#define RGBLIGHT_LIMIT_VAL 120 -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -// Underglow -/* -#undef RGBLED_NUM -#define RGBLED_NUM 14 // Number of LEDs -#define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_SLEEP -*/ +#define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/keymap.c b/keyboards/lily58/keymaps/oldfieldtc/keymap.c index 44ef15f56feb..394e1cf5d64c 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/keymap.c +++ b/keyboards/lily58/keymaps/oldfieldtc/keymap.c @@ -1,3 +1,6 @@ +// Copyright 2022 Tommy Oldfield (@oldfieldtc) +// SPDX-License-Identifier: GPL-2.0-or-later + #include QMK_KEYBOARD_H #ifdef PROTOCOL_LUFA From b2cdc45a1ef9f815daf8050371c687100abeb484 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Sun, 16 Oct 2022 11:23:54 +0100 Subject: [PATCH 3/7] Rename README.md to readme.md --- keyboards/lily58/keymaps/oldfieldtc/{README.md => readme.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename keyboards/lily58/keymaps/oldfieldtc/{README.md => readme.md} (100%) diff --git a/keyboards/lily58/keymaps/oldfieldtc/README.md b/keyboards/lily58/keymaps/oldfieldtc/readme.md similarity index 100% rename from keyboards/lily58/keymaps/oldfieldtc/README.md rename to keyboards/lily58/keymaps/oldfieldtc/readme.md From 78920ec31ba9c1066affd3ee1f420e5e38baffe0 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Fri, 21 Oct 2022 20:10:11 +0100 Subject: [PATCH 4/7] Remove unneeded code --- keyboards/lily58/keymaps/oldfieldtc/config.h | 2 -- keyboards/lily58/keymaps/oldfieldtc/keymap.c | 13 ++----------- keyboards/lily58/keymaps/oldfieldtc/readme.md | 15 --------------- keyboards/lily58/keymaps/oldfieldtc/rules.mk | 19 +------------------ 4 files changed, 3 insertions(+), 46 deletions(-) diff --git a/keyboards/lily58/keymaps/oldfieldtc/config.h b/keyboards/lily58/keymaps/oldfieldtc/config.h index ebe16a24b455..3ec6f63262ae 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/config.h +++ b/keyboards/lily58/keymaps/oldfieldtc/config.h @@ -27,7 +27,5 @@ along with this program. If not, see . // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/keymap.c b/keyboards/lily58/keymaps/oldfieldtc/keymap.c index 394e1cf5d64c..4bf658ce2844 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/keymap.c +++ b/keyboards/lily58/keymaps/oldfieldtc/keymap.c @@ -3,19 +3,10 @@ #include QMK_KEYBOARD_H -#ifdef PROTOCOL_LUFA - #include "lufa.h" - #include "split_util.h" -#endif -#ifdef SSD1306OLED - #include "ssd1306.h" -#endif #ifdef WPM_ENABLE #include "wpm.h" #endif -extern uint8_t is_master; - enum layer_number { _QWERTY = 0, _LOWER, @@ -147,8 +138,8 @@ bool oled_task_user(void) { oled_write_ln(read_keylog(), false); oled_write_ln(read_keylogs(), false); - sprintf(wpm_str, "WPM: %03d", get_current_wpm()); - oled_write_ln(wpm_str, false); + oled_write_P(PSTR("WPM: "), false); + oled_write_ln(get_u8_str(get_current_wpm(), '0'), false); } else { render_logo(); } diff --git a/keyboards/lily58/keymaps/oldfieldtc/readme.md b/keyboards/lily58/keymaps/oldfieldtc/readme.md index 19df47034c16..2023f4cd619d 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/readme.md +++ b/keyboards/lily58/keymaps/oldfieldtc/readme.md @@ -1,20 +1,5 @@ # Lily58 keyboard keymap -## Getting started -- [Set up the QMK environment](https://docs.qmk.fm/#/newbs_getting_started) - - [Install QMK Toolbox](https://github.com/qmk/qmk_toolbox) - - [Install QMK MSYS](https://github.com/qmk/qmk_distro_msys/releases/latest) -- Update `keymap.c` in `keyboards/lily58/keymaps/oldfieldtc`. -- Set the following user configs - - `qmk config user.keyboard=lily58/rev1` - - `qmk config user.keymap=oldfieldtc` -- Run `qmk compile -kb lily58/rev1 -km oldfieldtc` -- Once compiled, open QMK Toolbox and open the `lily58_rev1_oldfieldtc.hex` file that is found at the root of the `qmk_firmware` directory. -- Disconnect one keyboard half and press the reset button on the half that is connected. A `Atmel DFU device connected (libusb0): Atmel Corp. ATmega32U4 (03EB:2FF4:0000)` notice should appear in the window. -- Press 'Flash' and the keyboard should be flashed. -- Disconnect that keyboard half and repeat the previous two steps with the other half. -- Connect both halves together and the keyboard should now be flashed with the new keymap. - ## Default layer ![Default keymap layer](https://user-images.githubusercontent.com/9656588/195990181-0f33ef49-0010-482c-bea8-fa84190cdf58.jpg) diff --git a/keyboards/lily58/keymaps/oldfieldtc/rules.mk b/keyboards/lily58/keymaps/oldfieldtc/rules.mk index 26fc66da4ec5..3b9c050b5241 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/rules.mk +++ b/keyboards/lily58/keymaps/oldfieldtc/rules.mk @@ -2,26 +2,9 @@ # 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 -MOUSEKEY_ENABLE = no # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = no # Console for debug -COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # 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 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. -SWAP_HANDS_ENABLE = no # Enable one-hand typing -OLED_ENABLE= yes # OLED display -OLED_DRIVER = SSD1306 WPM_ENABLE = yes # Words per minute calculation -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - # If you want to change the display of OLED, you need to change here SRC += ./lib/rgb_state_reader.c \ ./lib/layer_state_reader.c \ @@ -29,4 +12,4 @@ SRC += ./lib/rgb_state_reader.c \ ./lib/keylogger.c \ ./lib/timelogger.c \ # ./lib/mode_icon_reader.c \ - # ./lib/host_led_state_reader.c \ + # ./lib/host_led_state_reader.c \ \ No newline at end of file From 8fd0812af7848af5c1b3fe2549b0aeb8b1150ea8 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Thu, 27 Oct 2022 20:16:17 +0100 Subject: [PATCH 5/7] Removed comments from rules.mk --- keyboards/lily58/keymaps/oldfieldtc/rules.mk | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/keyboards/lily58/keymaps/oldfieldtc/rules.mk b/keyboards/lily58/keymaps/oldfieldtc/rules.mk index 3b9c050b5241..004b46d64100 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/rules.mk +++ b/keyboards/lily58/keymaps/oldfieldtc/rules.mk @@ -1,9 +1,5 @@ -# 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 -# -EXTRAKEY_ENABLE = yes # Audio control and System control -WPM_ENABLE = yes # Words per minute calculation +EXTRAKEY_ENABLE = yes +WPM_ENABLE = yes # If you want to change the display of OLED, you need to change here SRC += ./lib/rgb_state_reader.c \ From ad2249cece1161e5954724bef086e0fa03414ed7 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Fri, 24 Mar 2023 20:26:36 +0000 Subject: [PATCH 6/7] Remove unneeded code --- keyboards/lily58/keymaps/oldfieldtc/config.h | 8 -------- keyboards/lily58/keymaps/oldfieldtc/keymap.c | 6 ------ 2 files changed, 14 deletions(-) diff --git a/keyboards/lily58/keymaps/oldfieldtc/config.h b/keyboards/lily58/keymaps/oldfieldtc/config.h index 3ec6f63262ae..edfc9530b24f 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/config.h +++ b/keyboards/lily58/keymaps/oldfieldtc/config.h @@ -19,13 +19,5 @@ along with this program. If not, see . #pragma once -//#define USE_MATRIX_I2C - -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 \ No newline at end of file diff --git a/keyboards/lily58/keymaps/oldfieldtc/keymap.c b/keyboards/lily58/keymaps/oldfieldtc/keymap.c index 4bf658ce2844..11750e82e85c 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/keymap.c +++ b/keyboards/lily58/keymaps/oldfieldtc/keymap.c @@ -3,10 +3,6 @@ #include QMK_KEYBOARD_H -#ifdef WPM_ENABLE - #include "wpm.h" -#endif - enum layer_number { _QWERTY = 0, _LOWER, @@ -129,8 +125,6 @@ void set_keylog(uint16_t keycode, keyrecord_t *record); const char *read_keylog(void); const char *read_keylogs(void); -char wpm_str[10]; - bool oled_task_user(void) { if (is_keyboard_master()) { // If you want to change the display of OLED, you need to change here From 26b9bc2b3bf6b29b850dd2470aae16b8b15550f8 Mon Sep 17 00:00:00 2001 From: Tommy Oldfield Date: Tue, 11 Apr 2023 13:03:11 +0100 Subject: [PATCH 7/7] Update readme with imgur links --- keyboards/lily58/keymaps/oldfieldtc/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keyboards/lily58/keymaps/oldfieldtc/readme.md b/keyboards/lily58/keymaps/oldfieldtc/readme.md index 2023f4cd619d..8aa978d52e25 100644 --- a/keyboards/lily58/keymaps/oldfieldtc/readme.md +++ b/keyboards/lily58/keymaps/oldfieldtc/readme.md @@ -1,22 +1,22 @@ # Lily58 keyboard keymap ## Default layer -![Default keymap layer](https://user-images.githubusercontent.com/9656588/195990181-0f33ef49-0010-482c-bea8-fa84190cdf58.jpg) +![Default keymap layer](https://i.imgur.com/c5kbMww.jpg) [Default layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/8ff6160c16e9b9ee7e104538bfad4a59) ## Lower layer -![Lower keymap layer](https://user-images.githubusercontent.com/9656588/195990663-cae90d7a-988c-4230-a52b-8c70e0289443.jpg) +![Lower keymap layer](https://i.imgur.com/GcLR3Uw.jpg) [Lower layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/7d77cd87c53d5eded50530242b852c20) ## Raise layer -![Raise keymap layer](https://user-images.githubusercontent.com/9656588/195990956-7ff1b698-7f76-452a-ae12-c5de638563a8.jpg) +![Raise keymap layer](https://i.imgur.com/aNVwlKJ.jpg) [Raise layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/c7a63881a13e339f1b5b847637677e5f) ## Adjust layer -![Adjust keymap layer](https://user-images.githubusercontent.com/9656588/195991198-a00247ed-4c24-4a7e-852e-46f61d80bf6f.jpg) +![Adjust keymap layer](https://i.imgur.com/0l4c1Df.jpg) [Adjust layer - Keyboard layout editor](http://www.keyboard-layout-editor.com/#/gists/15a25bc84fa69a1b9f228574674728d3)