diff options
author | QMK Bot <hello@qmk.fm> | 2022-02-12 03:23:18 +0000 |
---|---|---|
committer | QMK Bot <hello@qmk.fm> | 2022-02-12 03:23:18 +0000 |
commit | 52d6f07a829baf38e16b61f1804bf5dd555ab45d (patch) | |
tree | ea33ed02f739b909a6260f4b87392d36db08de08 /keyboards/ploopyco | |
parent | 0f926a8ae895580612313c866575969759a88db8 (diff) | |
parent | 40529e89de5a49b6d7978aedef9dd425d24f746d (diff) | |
download | qmk_firmware-52d6f07a829baf38e16b61f1804bf5dd555ab45d.tar.gz qmk_firmware-52d6f07a829baf38e16b61f1804bf5dd555ab45d.zip |
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'keyboards/ploopyco')
-rw-r--r-- | keyboards/ploopyco/mouse/keymaps/uqs/keymap.c | 36 | ||||
-rw-r--r-- | keyboards/ploopyco/mouse/keymaps/uqs/rules.mk | 1 |
2 files changed, 37 insertions, 0 deletions
diff --git a/keyboards/ploopyco/mouse/keymaps/uqs/keymap.c b/keyboards/ploopyco/mouse/keymaps/uqs/keymap.c new file mode 100644 index 0000000000..564dad13df --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/uqs/keymap.c @@ -0,0 +1,36 @@ +// Copyright 2022 Ulrich Spörlein (@uqs) +// SPDX-License-Identifier: GPL-2.0-or-later +// vi:et sw=4: + +#include QMK_KEYBOARD_H + +enum custom_keycodes { + DBL_CLK_NO = SAFE_RANGE, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // This works fine in xev(1) or a browser, but not in the game where I + // would want it. Maybe need to increase the delay? Also needs to be + // rewritten to use Deferred Execution. + case DBL_CLK_NO: + if (record->event.pressed) { + tap_code(KC_BTN2); + wait_ms(150); + tap_code(KC_BTN2); + wait_ms(300); + tap_code(KC_N); + } + return false; + } + return true; +} + + +// Layout is: +// left-most, M1, M3, M2, right-most, fwd, back (on side), tiny middle one + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_E, KC_BTN1, KC_BTN3, KC_BTN2, KC_LSFT, KC_BTN4, KC_BTN5, DF(1)), // shooters + [1] = LAYOUT(KC_1, KC_BTN1, KC_Y, KC_BTN2, DBL_CLK_NO, KC_N, KC_Y, DF(0)), // stardew valley, sword on 1 +}; diff --git a/keyboards/ploopyco/mouse/keymaps/uqs/rules.mk b/keyboards/ploopyco/mouse/keymaps/uqs/rules.mk new file mode 100644 index 0000000000..59222a688a --- /dev/null +++ b/keyboards/ploopyco/mouse/keymaps/uqs/rules.mk @@ -0,0 +1 @@ +#VIA_ENABLE = yes |