Keyboard events with EWW #388
-
Since I could not find the answer in the documentation or elsewhere, I thought I will ask the question here: how do I handle keyboard events in |
Beta Was this translation helpful? Give feedback.
Replies: 5 comments
-
This is not possible at least for now. You might be able to do some stuff combining |
Beta Was this translation helpful? Give feedback.
-
You cannot I guess, if you mean when eww is focused then it might be possible in near future, but for global key events I'd recommend just using your window manager's keybind daemon. |
Beta Was this translation helpful? Give feedback.
-
I think this would be a very valuable feature. Eww is used primarily in environments such as i3 where keyboard is prevailing, and navigating a menu with key arrows is a lot more practical than getting the mouse. For instance I’m trying to make a power menu (similar to the one in the readme) and I don’t want to use the mouse everytime I shut down my computer. Is it planned to be added? Or is it something that is likely to never get supported? |
Beta Was this translation helpful? Give feedback.
-
I'd also like this feature. My use case is an app launcher using eww (input which calls a python script on change that searches all .desktop files for the input and writes the results to a JSON file, and then eww displays that). I currently have enter launch the first result and clicking a result launches that one, but I'd also like to be able to select a result using the arrow up/down and then launch using enter |
Beta Was this translation helpful? Give feedback.
-
Only tangentially related, but I had an idea for passing arguments to windows that might be applicable here: Have a polling/listening variable capture the output of some command that logs key presses, and set some yuck to that value when you’re hovering over the window (I’m currently trying to get something like this to work using xdotool, which has the ability to return the ID of the window your cursor is on, as well as other mouse info). Just make sure to protect the contents of that variable somehow, wouldn’t want to give someone the ability to log keypresses by making a log of changes to that file. |
Beta Was this translation helpful? Give feedback.
This is not possible at least for now. You might be able to do some stuff combining
eww update
with something likesxhkd
, however, that is far from ideal imo.