-
Notifications
You must be signed in to change notification settings - Fork 364
Add navigation for clickable menu #1480
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
base: master
Are you sure you want to change the base?
Add navigation for clickable menu #1480
Conversation
7ae6447 to
fec41e4
Compare
Since we need to use keyboard process in "Add navigation for clickable menu" (dunst-project/dunst#1480), add libxkbcommon. Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
Add menu related function to prepare key navigation feature. Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
Introduce built-in menu keybaord settings in dunstrc. Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
fec41e4 to
079185e
Compare
|
V2: rebase code. |
|
i added libxkbc to the dockerfiles. ci looks good, the only problem is something with doxygen |
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1480 +/- ##
==========================================
- Coverage 64.90% 62.83% -2.07%
==========================================
Files 51 51
Lines 9024 9337 +313
Branches 1048 1128 +80
==========================================
+ Hits 5857 5867 +10
- Misses 3167 3470 +303
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i didn't write a lot because most of the code is for the menu. I will also review the other pr
| ifneq (0,${WAYLAND}) | ||
| pkg_config_packs += wayland-client | ||
| pkg_config_packs += wayland-cursor | ||
| pkg_config_packs += xkbcommon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is xkb only used in wayland?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is xkb only used in wayland?
In the current code, libxkbcommon is used only for Wayland, as X11 has its own built-in XKB extension and doesn't require libxkbcommon.
| } touch; | ||
|
|
||
| struct { | ||
| struct wl_keyboard *wl_keyboard; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you know this well, do you think this wayland keyboard interface can also be used for the shortcuts that dunst offers in Xorg? (https://dunst-project.org/documentation/#Keyboard-shortcuts-X11-only)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you know this well, do you think this wayland keyboard interface can also be used for the shortcuts that dunst offers in Xorg? (https://dunst-project.org/documentation/#Keyboard-shortcuts-X11-only)
In my opinion, menu navigation utilizes simple arrow keys and 'Enter' within the notification context, which is fundamentally different from global shortcuts that require modifier combinations, such as 'modifier' +Key. We provide intuitive UI navigation similar to dialog boxes or web forms, while the existing shortcuts are system-wide hotkeys for operations like closing all notifications or viewing history.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bynect This is only the standard keyboard interface for wayland applications to get keyboard events. Usually the compositor will only pass the keyboard events to the currently focused application. Given that dunst doesn't want (and probably can't) steal the focus, it'll only work for a limited set of use cases.
For proper global shortcuts the direction seems to be the Global Shortcuts Portal API from Flatpack. GNOME already implements it. But for wl-roots it's still an open issue: emersion/xdg-desktop-portal-wlr#240
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's what I thought. thank you for confirmation 👍🏻
Add function to handle built-in menu key navigation. Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
The design now utilizes an inverted display when the key is in focus, with the first key being in focus when the menu appears. Signed-off-by: gujie <jie.gu@leica-geosystems.com.cn>
079185e to
069cba5
Compare
|
This PR is based on #1436, containing a lot of the same code. However it uses totally different commits. This means that if #1436 is merged, this PR would likely have a lot of merge conflicts. I suggest either dropping #1436, because this all of its functionality, or properly rebasing on this PR (which would involve some git trickery). |
|
I originally proposed to split the menu button and this pr since this added libxkd dependency. I think the best course is to merge the other pr first and then rebase this one on top of it. |
Yeah, that could work |
Hello fellow geeks,
I add key navigation inside of notification:
I tested it in Wayland, hope this makes the built-in menu more user-friendly.
This PR is based on #1436, which introduces a built-in clickable menu feature.
Additionally, since this functionality depends on libxkbcommon, I have added it to the CI Docker image in dunst-project/docker-images#16.