Comments (14)
Above was not a full analog, that would require decoupling of modes from actions
<keybind key="W-p" >
<action name="EnterKeybindMode" id="present" />
</keybind>
<!-- Title content is displayed on OSD while the mode is active -->
<keybind_mode id= "present" Title="Present:\n(m)irror\nset-(o)utput\nset-(r)egion\n(Shift) unset-(r)egion\nset-(s)caling\ntoggle-(f)reeze\n(c)ustom" >
<keybind key="m">
<action name="Execute" command="wl-present mirror" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="o">
<action name="Execute" command="wl-present set-output" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="r">
<action name="Execute" command="wl-present set-region" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="S-r">
<action name="Execute" command="wl-present unset-region" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="s">
<action name="Execute" command="wl-present set-scaling" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="f">
<action name="Execute" command="wl-present toggle-freeze" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="c">
<action name="Execute" command="wl-present custom" />
<action name="ExitKeybindMode" />
</keybind>
<keybind key="Escape">
<action name="ExitKeybindMode" />
</keybind>
<keybind key="Enter"
<action name="ExitKeybindMode" />
</keybind>
</keybind_mode>
from labwc.
Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains
from labwc.
This looks *very* complicated for a very niche use-case. And it reminds me more of emacs / vim rather than a stacking compositor / window manager.
from labwc.
Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains
Can't open openbox.org for some reason, but indirect references suggest this is at least something similar.
from labwc.
Is this the Openbox equivalent of what you describe? http://openbox.org/wiki/Help:Bindings#Key_chains
I've read it, yes this is extremely similar.
from labwc.
I second that, not having modes in labwc is meh. sway does extremely good job with nested keybindings. also yes, openbox had it ages ago :DDDDD
from labwc.
Let's go for it then π I'm not opposed to it.
In term of writing code, I'm going to prioritize this stuff first: johanmalm/roadmap#1
But if anyone else wants to roll their sleeves up, then we're on.
from labwc.
Implementing key shortcuts for menu entries sounds way less intrusive and more flexible to me. It
- provides the exact same feature as nested keybinds
- allows to also select the sub actions via the mouse or up / down / enter keys and not only via the key shortcut
- would support dynamic "keybind modes" via pipe menus
- doesn't drastically make tracking the pressed key states more complicated compared to key chains / keybind modes
from labwc.
menu entries is somewhat different beast. usually people use that to separate window actions, for example. like Meta-r to enter resize mode and then meta+hjkl to set the direction.
from labwc.
Any examples where the menu based approach wouldn't work in comparison to a key mode based approach? I think it is actually way more flexible because you can nest however deep you want + have interactive control and well.. a visible menu.
from labwc.
Spawning a menu to resize the window? I believe it would violate the Principle of least astonishment, given that i3, sway and openbox have hierarchial keybindings implemented differently. Would it be a special menu for window? Should it be moved with a window? Where to place the menu if a hotkey is not related to a window? What to do if a menu contains hotkeys that operate on different objects (windows, desktops, etc)?
If someone wants a visual menu, he can use the existing facilities.
from labwc.
Iβve not yet pondered this much, but feel like carrying on the thought experiment.
With menu entry key shortcuts, a very similar set of code paths would exist compared to those required for nested keybinds.
How about if we added options to not show the menu, but rather just displaying the pressed key chain in an OSD (as openbox does for key chains).
It would then operate exactly like key chains, except that the user would have to define them as menus with an ID which theyβd have to bind to a keybind.
Pro: shared code
Con: Unusual config syntax
from labwc.
IMO going through obscure config hacks will hurt in the long run.
from labwc.
IMO going through obscure config hacks will hurt in the long run.
I think you're right. Feels like we should implement it cleanly and independently (with Openbox style syntax http://openbox.org/wiki/Help:Bindings#Key_chains)
With server->input_mode
I suspect it would be quite a straight forward implementation (famous last words!)
from labwc.
Related Issues (20)
- Viewporter protocol and layer-shell surfaces HOT 3
- Firefox Wayland goes crazy if display scale is changed and a window is placed over its top left corner HOT 5
- [Bug] Mouse not instantly captured by a game on movement HOT 1
- Unity Editor and various X11 programs fail to create a window HOT 4
- Colors saturation VGA vs HDMI HOT 3
- xdg_toplevel_set_fullscreen only sends config after a buffer is bound HOT 5
- drm leasing of the display labwc is using - does wp_drm_lease_v1_destroy restore the desktop? HOT 4
- Plan for release `0.8.1`
- [Question] How to use the magnifier
- When the width of the window is less than the length of the title, there will be a noticeable shrinkage process HOT 3
- [magnifier]: Leaving a flickering afterimage HOT 2
- menu contrast HOT 4
- Touchscreen gesture support? HOT 10
- 71b2b5a introduces a new string for translation HOT 1
- "go there..." and I noticed an empty space HOT 16
- New padding introduced into theme HOT 3
- Should the mouse pointer relocate to the location of a touch event on a touchscreen? HOT 1
- Input in chromuim by text-input-v3, the pop windows will blink one time. HOT 2
- Can't interact with some pop-up WINE windows. HOT 3
- Move/resize is unfinished when `Move`/`Resize` action is bound to both `Press` and `Drag` events
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.