Merge pull request #1065 from keyboardio/unicode/setLinuxKey

pull/1054/head
Jesse Vincent 3 years ago committed by GitHub
commit da684d40f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -21,17 +21,18 @@ namespace kaleidoscope {
namespace plugin {
uint8_t Unicode::input_delay_;
Key Unicode::linux_key_ = Key_U;
void Unicode::start(void) {
switch (::HostOS.os()) {
case hostos::LINUX:
kaleidoscope::Runtime.hid().keyboard().pressRawKey(Key_LeftControl);
kaleidoscope::Runtime.hid().keyboard().pressRawKey(Key_LeftShift);
kaleidoscope::Runtime.hid().keyboard().pressRawKey(Key_U);
kaleidoscope::Runtime.hid().keyboard().pressRawKey(linux_key_);
kaleidoscope::Runtime.hid().keyboard().sendReport();
kaleidoscope::Runtime.hid().keyboard().releaseRawKey(Key_LeftControl);
kaleidoscope::Runtime.hid().keyboard().releaseRawKey(Key_LeftShift);
kaleidoscope::Runtime.hid().keyboard().releaseRawKey(Key_U);
kaleidoscope::Runtime.hid().keyboard().releaseRawKey(linux_key_);
kaleidoscope::Runtime.hid().keyboard().sendReport();
break;
case hostos::WINDOWS:

@ -39,7 +39,15 @@ class Unicode : public kaleidoscope::Plugin {
static uint8_t input_delay() {
return input_delay_;
}
static void setLinuxKey(const Key key) {
linux_key_ = key;
}
static Key getLinuxKey() {
return linux_key_;
}
private:
static Key linux_key_;
static uint8_t input_delay_;
};
}

Loading…
Cancel
Save