Merge branch 'master' into patch-1

pull/389/head
Gergely Nagy 6 years ago committed by GitHub
commit eaa0ce111d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

@ -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
)
```

@ -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;

@ -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_;

Loading…
Cancel
Save