-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to change state of virtual keys from an external program #105
Comments
This will be available in the upcoming 4.0.0 release which is already documented and testable in the next branch. |
I sadly didn't have time to thoroughly test this during the weekend but I just now got it built and installed. Initial findings: There seems to be a regression with parsing parameterized aliases. On startup I got [class=JetBrainsIDE title=/Diff for Pull Request |Commit: |Shelved: |History: /i]
ContextActive >> context["JetBrainsIDE pull request, commit or shelve diff"] Removing the comma got rid of the error, so I assume it parsed it as two parameters It also seems the call to context = 50ms log["entered $0"] ^ log["left $0"] notify = $(notify-send -t "$1" keymapper "$0") Previously the
Now the triggered class matching regex is logged instead:
Is this an intentional change or just a change in how |
Due to regressions mentioned here #91 (comment), it might take a bit of time for me to test As a side note - after I had brought up this feature request, I got a slight feeling of remorse as I feared this would make the code much more complicated and with that risk breaking things up... I hope this won't become a huge PITA for you! |
Oh, forgot to mention. The descriptions for these two options seem to be mixed around:
|
Ok I couldn't resist. I've quickly tested all
Changes:
|
No, I think it is substituting aliases again in some strings. Thanks for your improvements of the help text!
But it is possible to pass more than one option.
|
Aha! I need to test it more then. It was so late I just did some half brained tests. Something like:
..then made a note that nothing happened from |
Hmm this got me thinking. Can you come up with a way these could be used to make a debounce effect on a virtual key? An example, based on my QMK caps word emulation you've seen earlier (which has btw worked more reliably than I would have ever expected given the hacky way it's implemented!): Digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
Letter = A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
CapsWord = Virtual1
# CapsWord emulation (https://docs.qmk.fm/#/feature_caps_word)
[default]
CapsWordKey = Letter | Digit | Minus | Backspace
Shift{200ms} >> Shift
(ShiftLeft ShiftRight) >> CapsWord CapsLock ^
ShiftLeft >> ShiftLeft
ShiftRight >> ShiftRight
# Optional external indicator, caps lock should already be lit
CapsWord >> caps_word_status_on ^ caps_word_status_off
[modifier="CapsWord"]
Minus >> Shift{Minus} # '_'
CapsWordKey >> CapsWordKey
Any >> CapsWord CapsLock Any ^ To furher improve this, the mode would deactivate if none of the keys covered by And don't get me wrong, I don't want to expand the scope of this feature request! Edit: Perhaps this would require a way to use explicit keydown events on the output? For example include a keydown event for Minus >> Shift{Minus} # '_'
CapsWordKey >> CapsWordKey AFAIK, currently it would only be possible to toggle a virtual key in this type of use case(?) |
Very cool your caps word configuration. Yeah, the automatic deactivation should not be a problem with this new feature. The alias substitution hopefully works correctly now. I could not resist to add a few more features to The instance feature allows to cancel or replace these long running processes. It is stopped when running a new process with the same id: |
With the new changes, the previous behavior of [default]
launch_telegram >> $(i3-open -c Telegram "gtk-launch $(basename $(rg -l Telegram $HOME/.local/share/applications))")
launch_whatsapp >> $(i3-open -t WhatsApp "gtk-launch $(basename $(rg -l WhatsApp $HOME/.local/share/applications))") In this particular case, I had forgot I wrote |
This should be fixed with the latest commit, thanks for reporting! |
I see my ridiculously complicated way of launching Telegram has ended up as a unit test. 🤣 Backstory: I haven't figured out a simpler way to launch desktop shortcuts by name. In the case of Telegram, just |
I can't reproduce the issue in 4.0, fix confirmed. 👍 |
Discussed in #103
The text was updated successfully, but these errors were encountered: