Open
Conversation
Also on Alt-Space but that's usually handled by Mutter. Also on Alt-Number, and additionally handle Ctrl-Number. Closes sonnyp#126 Currently the number keys are handled by the window: pressing one will focus the corresponding tile and releasing the key will activate that tile. Return and Space are handled by the tile itself. This change moves responsibility for handling key-released events of number keys from the window to the tiles. The key-pressed event focuses the tile so it can handle the subsequent key-released event. The tiles don't know their corresponding number but since the tile is focused it can assume that the number key was meant for it.
sonnyp
requested changes
Sep 23, 2023
Owner
sonnyp
left a comment
There was a problem hiding this comment.
Thanks! I have merged main into this branch, make sure to pull.
Please do not handle Alt+Space - as you said it's already taken.
Also revert the changes, 1/2/3/4 worked fine, no reason to change it.
The following are good to add in this PR
- Alt+Return opens the contextual menu for the selected entry
- Alt+Number to open the context menu for a numbered entry
Also do add your name to about.js contributos and update the keyboard shortcut window please
Comment on lines
-96
to
-100
| eventController.connect("key-released", (self, keyval) => { | ||
| const button = getButtonForKeyval(keyval); | ||
| button?.activate(); | ||
| return !!button; | ||
| }); |
Owner
There was a problem hiding this comment.
Your version doesn't do the same thing as this.
This highlights the entry before opening the browsing showing the user which browser is gonna open before Juncton closes. It's subtitle but you should be able to tell the difference.
Please revert
| } else { | ||
| open(!(modifier_state & Gdk.ModifierType.CONTROL_MASK)); | ||
| } | ||
| controller_key.set_state(Gtk.EventSequenceState.CLAIMED); |
Owner
There was a problem hiding this comment.
TypeError: controller_key.set_state is not a function
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Also on Alt-Space but that's usually handled by Mutter.
Also on Alt-Number, and additionally handle Ctrl-Number.
Closes #126
Currently the number keys are handled by the window: pressing one will focus the corresponding tile and releasing the key will activate that tile.
Return and Space are handled by the tile itself.
This change moves responsibility for handling key-released events of number keys from the window to the tiles. The key-pressed event focuses the tile so it can handle the subsequent key-released event. The tiles don't know their corresponding number but since the tile is focused it can assume that the number key was meant for it.