mirror of
				https://github.com/labwc/labwc.git
				synced 2025-10-29 05:40:24 -04:00 
			
		
		
		
	Add onRelease option to <keybind>
...to make keybind actions fire on the release event rather then when the
key is first pressed. This is useful for binding actions to modifier keys
only. The most likely use-case for this is the binding of a Super key to a
menu, for example:
    <keybind key="Super_L" onRelease="yes">
      <action name="Execute" command="rofi -show drun"/>
    </keybind>
If another keybind is issued between the press and release, the on-release
keybind is cancelled.
Co-authored-by: @johanmalm
			
			
This commit is contained in:
		
							parent
							
								
									f6c91c8d13
								
							
						
					
					
						commit
						84c222a84f
					
				
					 6 changed files with 51 additions and 5 deletions
				
			
		|  | @ -492,6 +492,23 @@ extending outward from the snapped edge. | |||
| 	If set to "no" (or is absent) the keybind will be layout agnostic. | ||||
| 	Default is no. | ||||
| 
 | ||||
| *<keyboard><keybind key="" onRelease="yes|no">* | ||||
| 	*onRelease*, when yes, fires the keybind action when the key or key | ||||
| 	combination is released, rather than first pressed. This is useful to | ||||
| 	bind actions to only modifier keys, where the action should fire when | ||||
| 	the modifier is used without another key. Default is no. | ||||
| 
 | ||||
| 	The example below will trigger the launch of rofi when the super key is | ||||
| 	pressed & released, without interference from other multi-key | ||||
| 	combinations that include the super key: | ||||
| 
 | ||||
| 
 | ||||
| 	``` | ||||
| 	<keybind key="Super_L" onRelease="yes"> | ||||
| 	  <action name="Execute" command="rofi -show drun"/> | ||||
| 	</keybind> | ||||
| 	``` | ||||
| 
 | ||||
| *<keyboard><keybind key=""><action name="">* | ||||
| 	Keybind action. See labwc-actions(5). | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Simon Long
						Simon Long