From d39b258cd23eb0f13f78e9119ca0b4347ed69264 Mon Sep 17 00:00:00 2001 From: Jean-Martin Archer Date: Fri, 10 Aug 2018 20:03:41 -0700 Subject: [PATCH 1/5] Add some additional documentation for how to define Qukeys and what the Model 01's keymap looks like. (Commit edited by @obra) --- README.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fba93073..60d0c9ef 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,23 @@ one keycode (i.e. symbol) when tapped, and a different keycode -- most likely a ``` KALEIDOSCOPE_INIT_PLUGINS(Qukeys); ``` -- Define some `Qukeys` of the format `Qukey(layer, row, col, alt_keycode)` (layers, rows and columns are all zero-indexed, rows are top to bottom and columns are left to right): + +- Define some `Qukeys` of the format `Qukey(layer, row, col, alt_keycode)` + (layers, rows and columns are all zero-indexed, rows are top to bottom and + columns are left to right): + +- For the Keyboardio Model 01, key coordinates refer to [this header + file](https://github.com/keyboardio/Kaleidoscope-Hardware-Model01/blob/f469015346535cb864a340bf8eb317d268943248/src/Kaleidoscope-Hardware-Model01.h#L267-L279). + ``` QUKEYS( + // l, r, c, alt_keycode kaleidoscope::Qukey(0, 2, 1, Key_LeftGui), // A/cmd kaleidoscope::Qukey(0, 2, 2, Key_LeftAlt), // S/alt kaleidoscope::Qukey(0, 2, 3, Key_LeftControl), // D/ctrl - kaleidoscope::Qukey(0, 2, 4, Key_LeftShift) // F/shift + kaleidoscope::Qukey(0, 2, 4, Key_LeftShift), // F/shift + kaleidoscope::Qukey(0, 1, 14, Key_LeftShift), // P/shift + kaleidoscope::Qukey(0, 3, 15, Key_LeftShift) // Minus/shift ) ``` From 23f5e60a5aba1c481c0d622f1c42659cdd6537ad Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Fri, 10 Aug 2018 20:04:52 -0700 Subject: [PATCH 2/5] Whitespace only changes --- README.md | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/README.md b/README.md index 60d0c9ef..22fd87f2 100644 --- a/README.md +++ b/README.md @@ -67,48 +67,48 @@ likely to generate errors and out-of-order events. ### DualUse key definitions In addition to normal `Qukeys` described above, Kaleidoscope-Qukeys also treats -DualUse keys in the keymap as `Qukeys`. This makes `Qukeys` a drop-in replacement +DualUse keys in the keymap as `Qukeys`. This makes `Qukeys` a drop-in replacement for the `DualUse` plugin, without the need to edit the keymap. - -The plugin provides a number of macros one can use in keymap definitions: - -#### `CTL_T(key)` - -> A key that acts as the *left* `Control` when held, or used in conjunction with -> other keys, but as `key` when tapped in isolation. The `key` argument must be -> a plain old key, and can't have any modifiers or anything else applied. - -#### `ALT_T(key)` - -> A key that acts as the *left* `Alt` when held, or used in conjunction with -> other keys, but as `key` when tapped in isolation. The `key` argument must be -> a plain old key, and can't have any modifiers or anything else applied. - -#### `SFT_T(key)` - -> A key that acts as the *left* `Shift` when held, or used in conjunction with -> other keys, but as `key` when tapped in isolation. The `key` argument must be -> a plain old key, and can't have any modifiers or anything else applied. - -#### `GUI_T(key)` - -> A key that acts as the *left* `GUI` when held, or used in conjunction with -> other keys, but as `key` when tapped in isolation. The `key` argument must be -> a plain old key, and can't have any modifiers or anything else applied. - -#### `MT(mod, key)` - -> A key that acts as `mod` when held, or used in conjunction with other keys, -> but as `key` when tapped in isolation. The `key` argument must be a plain old -> key, and can't have any modifiers or anything else applied. The `mod` argument -> can be any of the modifiers, *left* or *right* alike. - -#### `LT(layer, key)` - -> A key that momentarily switches to `layer` when held, or used in conjunction -> with other keys, but as `key` when tapped in isolation. The `key` argument -> must be a plain old key, and can't have any modifiers or anything else + +The plugin provides a number of macros one can use in keymap definitions: + +#### `CTL_T(key)` + +> A key that acts as the *left* `Control` when held, or used in conjunction with +> other keys, but as `key` when tapped in isolation. The `key` argument must be +> a plain old key, and can't have any modifiers or anything else applied. + +#### `ALT_T(key)` + +> A key that acts as the *left* `Alt` when held, or used in conjunction with +> other keys, but as `key` when tapped in isolation. The `key` argument must be +> a plain old key, and can't have any modifiers or anything else applied. + +#### `SFT_T(key)` + +> A key that acts as the *left* `Shift` when held, or used in conjunction with +> other keys, but as `key` when tapped in isolation. The `key` argument must be +> a plain old key, and can't have any modifiers or anything else applied. + +#### `GUI_T(key)` + +> A key that acts as the *left* `GUI` when held, or used in conjunction with +> other keys, but as `key` when tapped in isolation. The `key` argument must be +> a plain old key, and can't have any modifiers or anything else applied. + +#### `MT(mod, key)` + +> A key that acts as `mod` when held, or used in conjunction with other keys, +> but as `key` when tapped in isolation. The `key` argument must be a plain old +> key, and can't have any modifiers or anything else applied. The `mod` argument +> can be any of the modifiers, *left* or *right* alike. + +#### `LT(layer, key)` + +> A key that momentarily switches to `layer` when held, or used in conjunction +> with other keys, but as `key` when tapped in isolation. The `key` argument +> must be a plain old key, and can't have any modifiers or anything else > applied. ## Design & Implementation From 4d8fa5d5dad9ceae2f5efee5ef233f57ccd0c829 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Mon, 20 Aug 2018 23:23:26 +0200 Subject: [PATCH 3/5] Drop the V1 plugin API compatibility code Signed-off-by: Gergely Nagy --- src/Kaleidoscope/Qukeys.cpp | 22 ---------------------- src/Kaleidoscope/Qukeys.h | 6 ------ 2 files changed, 28 deletions(-) diff --git a/src/Kaleidoscope/Qukeys.cpp b/src/Kaleidoscope/Qukeys.cpp index 18292dff..366f9a96 100644 --- a/src/Kaleidoscope/Qukeys.cpp +++ b/src/Kaleidoscope/Qukeys.cpp @@ -390,28 +390,6 @@ EventHandlerResult Qukeys::onSetup() { return EventHandlerResult::OK; } -// Legacy V1 API -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API -void Qukeys::begin() { - onSetup(); - Kaleidoscope.useEventHandlerHook(legacyEventHandler); - Kaleidoscope.useLoopHook(legacyLoopHook); -} - -Key Qukeys::legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state) { - EventHandlerResult r = ::Qukeys.onKeyswitchEvent(mapped_key, row, col, key_state); - if (r == EventHandlerResult::OK) - return mapped_key; - return Key_NoKey; -} - -void Qukeys::legacyLoopHook(bool is_post_clear) { - if (is_post_clear) - return; - ::Qukeys.beforeReportingState(); -} -#endif - } // namespace kaleidoscope { kaleidoscope::Qukeys Qukeys; diff --git a/src/Kaleidoscope/Qukeys.h b/src/Kaleidoscope/Qukeys.h index 959bc7f3..5b3508a3 100644 --- a/src/Kaleidoscope/Qukeys.h +++ b/src/Kaleidoscope/Qukeys.h @@ -104,12 +104,6 @@ class Qukeys : public kaleidoscope::Plugin { EventHandlerResult onKeyswitchEvent(Key &mapped_key, byte row, byte col, uint8_t key_state); EventHandlerResult beforeReportingState(); -#if KALEIDOSCOPE_ENABLE_V1_PLUGIN_API - void begin(); - static Key legacyEventHandler(Key mapped_key, byte row, byte col, uint8_t key_state); - static void legacyLoopHook(bool is_post_clear); -#endif - private: static bool active_; static uint16_t time_limit_; From c5b3b2fe753ec9869276cd6e41f0df4c8e2fa284 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 4 Sep 2018 18:24:02 -0700 Subject: [PATCH 4/5] Update travis.yml to point to new bundle repo --- .travis.yml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1fbeb196..e3e64f77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,23 @@ dist: trusty sudo: false os: - linux +addons: + apt: + packages: + - shellcheck install: - - git clone --recursive https://github.com/keyboardio/Arduino-Boards hardware/keyboardio/avr + - git clone --depth 1 --recurse-submodules https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio hardware/keyboardio script: - make travis-test BOARD_HARDWARE_PATH=$(pwd)/hardware + - shellcheck bin/kaleidoscope-builder notifications: + irc: + channels: + - "chat.freenode.net#keyboardio" + use_notice: true + skip_join: true + template: + - "%{repository_name}/%{branch} %{commit} by %{author}: %{commit_subject} %{build_url} %{message}" email: on_success: change on_failure: change From f79fc343401c53efec6b52a8b6b45bff14965679 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Tue, 4 Sep 2018 18:42:30 -0700 Subject: [PATCH 5/5] shellcheck should only be run in the Kaleidoscope repo --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3e64f77..23d30ccc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,15 +2,10 @@ dist: trusty sudo: false os: - linux -addons: - apt: - packages: - - shellcheck install: - git clone --depth 1 --recurse-submodules https://github.com/keyboardio/Kaleidoscope-Bundle-Keyboardio hardware/keyboardio script: - make travis-test BOARD_HARDWARE_PATH=$(pwd)/hardware - - shellcheck bin/kaleidoscope-builder notifications: irc: channels: