diff --git a/.travis.yml b/.travis.yml index 1fbeb196..23d30ccc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,10 +3,17 @@ sudo: false os: - linux 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 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 diff --git a/README.md b/README.md index 7dd61016..e6b5dbfe 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 ) ``` 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_;