mirror of
				https://github.com/labwc/labwc.git
				synced 2025-11-03 09:01:51 -05:00 
			
		
		
		
	keybinds: prefer keycodes over keysyms
This allows keyboard layout agnostic keybinds in a multi layout configuration. Fixes: #1069
This commit is contained in:
		
							parent
							
								
									8a67476ab3
								
							
						
					
					
						commit
						6b80751010
					
				
					 4 changed files with 140 additions and 11 deletions
				
			
		| 
						 | 
				
			
			@ -6,11 +6,17 @@
 | 
			
		|||
#include <xkbcommon/xkbcommon.h>
 | 
			
		||||
 | 
			
		||||
#define MAX_KEYSYMS 32
 | 
			
		||||
#define MAX_KEYCODES 16
 | 
			
		||||
 | 
			
		||||
struct server;
 | 
			
		||||
 | 
			
		||||
struct keybind {
 | 
			
		||||
	uint32_t modifiers;
 | 
			
		||||
	xkb_keysym_t *keysyms;
 | 
			
		||||
	size_t keysyms_len;
 | 
			
		||||
	xkb_keycode_t keycodes[MAX_KEYCODES];
 | 
			
		||||
	size_t keycodes_len;
 | 
			
		||||
	int keycodes_layout;
 | 
			
		||||
	struct wl_list actions;  /* struct action.link */
 | 
			
		||||
	struct wl_list link;     /* struct rcxml.keybinds */
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -30,4 +36,5 @@ uint32_t parse_modifier(const char *symname);
 | 
			
		|||
 | 
			
		||||
bool keybind_the_same(struct keybind *a, struct keybind *b);
 | 
			
		||||
 | 
			
		||||
void keybind_update_keycodes(struct server *server);
 | 
			
		||||
#endif /* LABWC_KEYBIND_H */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue