Skip to content

Commit

Permalink
[Keymap] Cleanup and updating of drashna keymap code (qmk#11516)
Browse files Browse the repository at this point in the history
* Update other keyboards for rgb matrix changes

* Remove customized bootmagic code

* Fix corne layout compilation error

* Fix compiler errors with all keymaps

* Add Simple Visualizer for ergodox infinity

* Fix compile issue with Corne

* Fix keymap stuff

* Add alias for mouse layer

* Add Halmak Keyboard layout

* Updates for Kyria

* Add support for oled interval

* Change RGB stuff

[CHANGE] Fix coexistence issues

* Fix rgb_stuff

* Add custom ploopyco mouse keymap

* Decrease default dwell time

* Updates based on last breaking changes update

* Disable command on dactyl

* Update ergodox to use proper commands for rgb matrix indicators

* Update all rgb matrix indicator functions

* Update rules for dactyl-manuform

* Reduce wait time for mouse layer off event

* Add more info to logger

* Add wrappers for get_tapping term

* Move version.h include into only file that actually needs it

* Update rgb sleep stuff

* Update key print function

* Change DM keymap settings

* Change pin for DM Manuform

* Add Proton C stuff for Corne keymap

* more arm corne tinkering

* Even more arm stuff for corne

* Cleanup corne stuff

* redirect default keymap to drashna

because I am a very bad man

* change corne rgb priority

* Update tractyl manuform to not conflict

* Add more secret stuff

* more dactyl tweaks

* Add more options to split transport

* Changes of oled support

* Change split settings

* Improve keylogger formatting more

* tweak oled stuff

* Oled and such tweaks

* Reduce brightness due to leds

* Decrease brightness more

* Only run layer code if master
  • Loading branch information
drashna authored and sowbug committed Jan 26, 2021
1 parent 87be6b5 commit b9f0661
Show file tree
Hide file tree
Showing 36 changed files with 588 additions and 270 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ void pointing_device_init(void) {
trackball_set_cpi(dpi_array[keyboard_config.dpi_config]);
}

static bool has_mouse_report_changed(report_mouse_t new, report_mouse_t old) {
static bool has_report_changed(report_mouse_t new, report_mouse_t old) {
return (new.buttons != old.buttons) ||
(new.x && new.x != old.x) ||
(new.y && new.y != old.y) ||
Expand Down Expand Up @@ -186,7 +186,7 @@ void pointing_device_send(void) {
mouseReport.x = 0;
mouseReport.y = 0;
process_mouse_user(&mouseReport, x, y);
if (has_mouse_report_changed(mouseReport, old_report)) {
if (has_report_changed(mouseReport, old_report)) {
host_mouse_send(&mouseReport);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.

#define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095
#define DYNAMIC_KEYMAP_LAYER_COUNT 16

/* serial.c configuration for split keyboard */
#undef SOFT_SERIAL_PIN
#define SOFT_SERIAL_PIN D2
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,4 @@
#pragma once


#define USE_SERIAL

#define MASTER_LEFT
// #define MASTER_RIGHT
//#define EE_HANDS
// Rows are doubled-up
#include "../drashna/config.h"
Original file line number Diff line number Diff line change
Expand Up @@ -14,50 +14,4 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H


#define _QWERTY 0
#define _LOWER 1
#define _RAISE 2

#define RAISE MO(_RAISE)
#define LOWER MO(_LOWER)

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_QWERTY] = LAYOUT_5x6_right_trackball(
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_LSFT, KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L ,KC_SCLN,KC_QUOT,
KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH,
KC_LBRC,KC_RBRC, KC_EQL,
RAISE,KC_SPC, LOWER,
KC_TAB,KC_HOME, KC_END, KC_DEL,
KC_BSPC, KC_GRV, KC_LGUI, KC_LALT
),

[_LOWER] = LAYOUT_5x6_right_trackball(

KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL,
_______,_______,_______,_______,_______,KC_LBRC, KC_RBRC, KC_P7 , KC_P8 , KC_P9 ,_______,KC_PLUS,
_______,KC_HOME,KC_PGUP,KC_PGDN,KC_END ,KC_LPRN, KC_RPRN, KC_P4 , KC_P5 , KC_P6 ,KC_MINS,KC_PIPE,
_______,_______,_______,_______,_______,_______, _______, KC_P1 , KC_P2 , KC_P3 ,KC_EQL ,KC_UNDS,
_______,KC_PSCR, KC_P0,
_______,_______, _______,
_______,_______, _______,_______,
_______,_______, _______,_______

),

[_RAISE] = LAYOUT_5x6_right_trackball(
KC_F12 , KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 ,KC_F10 ,KC_F11 ,
_______,_______,_______,_______,_______,KC_LBRC, KC_RBRC,_______,KC_NLCK,KC_INS ,KC_SLCK,KC_MUTE,
_______,KC_LEFT,KC_UP ,KC_DOWN,KC_RGHT,KC_LPRN, KC_RPRN,KC_MPRV,KC_MPLY,KC_MNXT,_______,KC_VOLU,
_______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,KC_VOLD,
_______,_______, _______,
_______,_______, _______,
_______,_______, _______,_______,
_______,_______, _______,_______
),
};
// placeholder
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
USER_NAME := drashna
SRC += ../drashna/keymap.c

include $(KEYBOARD_PATH_1)/keymaps/drashna/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,26 @@
#pragma once

// #define USE_I2C
#define SELECT_SOFT_SERIAL_SPEED 0
#define SERIAL_USE_MULTI_TRANSACTION

#define EE_HANDS
#define TRACKBALL_DPI_OPTIONS \
{ 1200, 1800, 2600, 3400 }

#define RGBLIGHT_EFFECT_TWINKLE_LIFE 50
#define RGBLIGHT_EFFECT_TWINKLE_PROBABILITY 1/63
#define RGBLIGHT_MAX_BRIGHTNESS 100

#undef DEBOUNCE
#define DEBOUNCE 10

#define SOLENOID_PIN F1
#define SOLENOID_DEFAULT_DWELL 8

#define OLED_DISPLAY_128X64
#define OLED_TIMEOUT 0
#define OLED_BRIGHTNESS 100
#define SPLIT_MODS_ENABLE

#define MK_KINETIC_SPEED
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "drashna.h"

#define TG_DBLO TG(_DIABLO)
#define _MOUSE _MEDIA


// clang-format off
Expand Down Expand Up @@ -172,7 +171,7 @@ void process_mouse_user(report_mouse_t* mouse_report, int16_t x, int16_t y) {
}

void matrix_scan_keymap(void) {
if (timer_elapsed(mouse_timer) > 750 && layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
if (timer_elapsed(mouse_timer) > 650 && layer_state_is(_MOUSE) && !mouse_keycode_tracker) {
layer_off(_MOUSE);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
RGBLIGHT_STARTUP_ANIMATION = yes
HAPTIC_ENABLE = SOLENOID
RGBLIGHT_STARTUP_ANIMATION = yes
HAPTIC_ENABLE = SOLENOID
COMMAND_ENABLE = no
AUDIO_ENABLE = yes
TAP_DANCE_ENABLE = yes
UNICODE_ENABLE = yes
OLED_DRIVER_ENABLE = yes

# DEBOUNCE_TYPE = sym_eager_pk
Loading

0 comments on commit b9f0661

Please sign in to comment.