Comments (14)
Have you used the ToggleKeybinds
action to prevent labwc from trying to interpret keypresses when the affected game is active?
from labwc.
@ahesford No, I never used it. this is my rc.xml file:
<?xml version="1.0"?>
<!--
This is a very simple config file with many options missing. For a complete
set of options with comments, see docs/rc.xml.all
-->
<labwc_config>
<core>
<gap>10</gap>
<adaptiveSync>fullscreen</adaptiveSync>
<!--<allowTearing>fullscreen</allowTearing>-->
</core>
<theme>
<name>Onyx</name>
<cornerRadius>0</cornerRadius>
<font name="Noto Sans Regular" size="10"/>
</theme>
<keyboard>
<default/>
<keybind key="W-s">
<action name="Execute" command="sh -c 'grim -o DP-1 - | swappy -f -'"/>
</keybind>
<keybind key="W-S-s">
<action name="Execute">
<command>sh -c 'grim -g "$(slurp)" - | swappy -f -'</command>
</action>
</keybind>
<keybind key="C-F11">
<action name="ToggleTearing" />
</keybind>
<keybind key="C-F12">
<action name="Execute" command="sh -c 'pkill pw-loopback || pw-loopback -m '[[FL FR]]' --playback-props='[media.class=Audio/Source]''"/>
</keybind>
<keybind key="C-A-t">
<action name="Execute" command="kitty"/>
</keybind>
<keybind key="W-r">
<action name="Execute" command="sh -c 'pkill rofi || rofi -show drun'"/>
</keybind>
<keybind key="W-e">
<action name="Execute" command="nautilus"/>
</keybind>
<keybind key="W-d">
<action name="Iconify" />
</keybind>
<keybind key="XF86_AudioLowerVolume">
<action name="Execute" command="pactl set-sink-volume @DEFAULT_SINK@ -5%"/>
</keybind>
<keybind key="XF86_AudioRaiseVolume">
<action name="Execute" command="pactl set-sink-volume @DEFAULT_SINK@ +5%"/>
</keybind>
</keyboard>
<libinput>
<device category="Logitech G703 LS">
<accelProfile>flat</accelProfile>
<naturalScroll>no</naturalScroll>
</device>
<device category="Logitech G703 LIGHTSPEED Wireless Gaming Mouse w/ HERO">
<accelProfile>flat</accelProfile>
<naturalScroll>no</naturalScroll>
</device>
</libinput>
</labwc_config>
from labwc.
Try binding a key (I like W-k
) to
<action name="ToggleKeybinds" />
When you launch your game, press that hotkey and the game window will receive all key events without labwc trying to grab them. (Except the same hotkey, which will disable that mode if pressed again.)
from labwc.
@ahesford it didn't work, unfortunately.
from labwc.
I can't easily replicate, so hard to fault find here.
Do you think the keyboard-focus is moving away from the window you're inputting into - or is it just the modifiers that are not received.
IIRC XWayland clients have 'mysterious waysof ascertaining what modifiers are pressed/released (on top of what we explicitly send from the
labwc` end), so there might be something deeper going on here.
I feel I'm grasping at straws, but detective work could include:
- Does it work on other
wlroots
compositors? We are very similar tosway
in many ways, so if you can get steam working onsway
that would be a useful comparison. - Running
WAYLAND_DEBUG=1 steam
from terminal to modifier press/release events - Testing if the
wlroots
patch in this MR makes a difference: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4496 That would basically send modifiers to all clients (not just the one with keyboard focus). Adding that patch towlroots
is unlikely to be the way forward, but we could probably achieve the same internally withinlabwc
. - Establish if
kwin
/mutter
broadcast modifiers (i.e. send them to all clients - not just the one with keyboard focus). Should be easy to test withWAYLAND_DEBUG=1 foot
(or whatever). Again, I can't easily do it, because I don't have a kwin instance and I've broken my mutter-wayland partition. - If you think that steam is moving focus around and that may be the problem, try a window rule to stop that by adding something like the snippet below to
rc.xml
:
<windowRules>
<windowRule identifier="foo" ignoreFocusRequest="yes"/>
</windowRules>
@kode54 @Joshua-Ashton - if you have time + ability to run that game, any change of leaning in?
from labwc.
@johanmalm
1- I just installed Sway to test and it works normally as well.
5- Setting the windowRule didn't work.
from labwc.
I was playing World of Warcraft today and I noticed some issues when using the ALT key.
In World of Warcraft, if I hold ALT and press the Arrow Up key, I can navigate through the previous messages I typed in the chat. For some reason it's not working on Labwc. Also if I hold ALT, I can't move the camera with my mouse.
A-Up
and A-LMB/
/ A-RMB
+ moving the mouse are default bindings in labwc.
You can disable them via
<keyboard>
<default />
<keybind key="A-Up" />
</keyboard>
<mouse>
<default />
<context name="Frame">
<mousebind button="A-Left" action="Press" />
<mousebind button="A-Left" action="Drag" />
<mousebind button="A-Right" action="Press" />
<mousebind button="A-Right" action="Drag" />
</context>
</mouse>
Not sure about Ctrl-v
not working, does it work when you copy something from another xwayland client and then paste it into WoW? You can verify what backend a specific window uses in the A-Tab
menu, first column.
from labwc.
@Consolatis This worked:
<keyboard>
<default />
<keybind key="A-Up" />
<keybind key="A-Down" />
</keyboard>
<mouse>
<default />
<context name="Frame">
<mousebind button="A-Left" action="Press" />
<mousebind button="A-Left" action="Drag" />
<mousebind button="A-Right" action="Press" />
<mousebind button="A-Right" action="Drag" />
</context>
</mouse>
does it work when you copy something from another xwayland client and then paste it into WoW?
Yes, it works.
Is there an easy way to disable all the keybinds and manually enable only the ones I want?
from labwc.
This worked
nice :)
Is there an easy way to disable all the keybinds and manually enable only the ones I want?
Depends on your definition of easy.
The <default />
loads the hardcoded default bindings (which should be the same as listed in docs/rc.xml.all
).
So you could not use <default />
but instead copy over the bindings from rc.xml.all
and remove those that you don't want. That results in a pretty messy config though.
Another theoretical option would be to use ToggleKeybinds
as suggested by @ahesford earlier in the thread.
However, that one doesn't handle the mousebinds as it would make it basically impossible to switch to another window.
It should work for the A-Up
and A-Down
keyboard input though. Maybe we could think about making ToggleKeybinds
ignore the "Frame" context for mousebinds (as that is the only one that eats the mouse events).
does it work when you copy something from another xwayland client and then paste it into WoW?
Yes, it works.
Hm, but wayland native ([xdg-shell]
) to WoW does not work?
I think there was some issue in wlroots regarding syncing the clipboard in one of the directions but that might have long been fixed. Or that was about drag and drop, really not sure right now.
from labwc.
Hm, but wayland native ([xdg-shell]) to WoW does not work?
It doesn't work.
I think there was some issue in wlroots regarding syncing the clipboard in one of the directions but that might have long been fixed. Or that was about drag and drop, really not sure right now.
But it works on Sway, so it shouldn't be a wlroots problem, right?
from labwc.
But it works on Sway, so it shouldn't be a wlroots problem, right?
Yeah, that is a good point. Really not sure what this could be about, I can paste from [xdg-shell]
(foot) to [xwayland]
(chromium) without issues.
from labwc.
Also if I hold ALT, I can't move the camera with my mouse.
Some additional context from me for this part of the issue that could apply:
I just started playing a new game where you have to use Alt + Left mouse button to complete an action, and that didn't work in labwc but it did in sway. So I tried a bunch of stuff and it turns out I have to add
<mousebind button="A-Left" action="Press">
<action name="None"/>
</mousebind>
to my config to get it to work ingame. I personally use W+Left/Right for moving/resizing windows with the mouse, which is why disabling that doesn't bother me.
Also I never thought about it, but ToggleKeybinds
doesn't disable mousebinds, so that didn't help me here.
from labwc.
After I removed the default keybinds, everything work fine, except the ctrl+c ctrl+v.
from labwc.
Ah woops, I completely missed that part of the thread. 😳
from labwc.
Related Issues (20)
- middle click button and active applications? HOT 1
- Inhibit idle question HOT 2
- Debian Packaging - Fixing Terminal Recommends HOT 4
- Add user-configurable blocklist for the security-context implementation
- Touchscreen bindings? HOT 4
- tilde symbol in pipemenus might be causing issues with commands? HOT 1
- Set the LANG in $HOME/.config/labwc/environment , It don't take effect on the menu of windows title. HOT 2
- firefox --kiosk: starts but does not show a window at all HOT 10
- Conditional actions example HOT 1
- Flickering with magnifier and gammastep HOT 11
- Plan for release `0.7.3`
- Dual graphic card HOT 1
- gamma control of output 43 failed when launching wlsunset HOT 2
- DnD between wayland and xwayland not working
- [Question] max_render_time adjustment setting? HOT 6
- Labwc allegedly slow to send fractional scale to applications HOT 3
- Assertion failed at `wlr_libinput_get_device_handle()` in nested session HOT 2
- Very odd Thonny behaviour when unmaximising a window HOT 3
- XDG configure state gets out of sync when clients timeout HOT 4
- Modal dialogs appear behind toplevel window if set by layer-shell-qt HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from labwc.