project-repo / cagebreak

Cagebreak: A Wayland Tiling Compositor Inspired by Ratpoison
MIT License
284 stars 19 forks source link

How to send the escape key (C-t) to windows? #3

Closed ghost closed 1 year ago

ghost commented 3 years ago

Hello, In ratpoision, I can do that with C-t t, which will send C-t to the current window. It seems cagebreak doesn't have a command to do that.

Thank you!

project-repo commented 3 years ago

Yes, that is correct, there is no command implemented to do this. I'm not sure how this is handled in other wayland compositors such as sway. One thing that I have seen mentioned is using tools such as ydotool to send keypresses. For example, you could try mapping a keybinding to executing ydotool accordingly. Let us know if something like that works and we can add it to the wiki, if not, I'll take a look at what would be involved to implement this. cheers, project-repo

project-repo commented 3 years ago

As indicated above, what you ask for is currently not possible in cagebreak. ydotool is also unfortunately not a viable option since the keypresses sent by ydotool are first interpreted by the compositor before being sent to the window. We might include what you ask for in a future release, though the timeline and exact way in which this is implemented is unclear at this point. Contributions regarding how this should be implemented in cagebreak are welcome.

You could try the following as a workaround:

Feel free to file any additional issues or ideas you may have.

cheers project-repo

ghost commented 3 years ago

Thank you for this detailed explanation, I haven't tried ydotool yet, and may look into workarounds or solutions later.

project-repo commented 1 year ago

Hi iyzsong

We have implemented something to enable what you want in Cagebreak, though it is not yet released or documented.

We created an option to disable interpretation of cagebreak commands for certain keyboards. Applying this to the virtual keyboard created by wtype-like tools and should finally resolve this issue.

Would this suit you or do you see any issues?

cheers project-repo

project-repo commented 1 year ago

Hi iyzsong

This is now released with version 2.0.0.

I am closing this issue.

cheers project-repo