fix: do not add key id string to input events if no text field is received
This commit is contained in:
		
							parent
							
								
									1c087203e0
								
							
						
					
					
						commit
						7b21398487
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -157,7 +157,7 @@ pub fn process_input_event(self: *Self, input_: []const u8, text: ?[]const u8) !
 | 
			
		|||
                input.event.press,
 | 
			
		||||
                key_.codepoint,
 | 
			
		||||
                key_.shifted_codepoint orelse key_.codepoint,
 | 
			
		||||
                text orelse input.utils.key_id_string(key_.base_layout_codepoint orelse key_.codepoint),
 | 
			
		||||
                text orelse "",
 | 
			
		||||
                @as(u8, @bitCast(key_.mods)),
 | 
			
		||||
            });
 | 
			
		||||
            if (self.bracketed_paste and self.handle_bracketed_paste_input(cbor_msg) catch |e| return self.handle_bracketed_paste_error(e)) {
 | 
			
		||||
| 
						 | 
				
			
			@ -171,7 +171,7 @@ pub fn process_input_event(self: *Self, input_: []const u8, text: ?[]const u8) !
 | 
			
		|||
                input.event.release,
 | 
			
		||||
                key_.codepoint,
 | 
			
		||||
                key_.shifted_codepoint orelse key_.codepoint,
 | 
			
		||||
                text orelse input.utils.key_id_string(key_.base_layout_codepoint orelse key_.codepoint),
 | 
			
		||||
                text orelse "",
 | 
			
		||||
                @as(u8, @bitCast(key_.mods)),
 | 
			
		||||
            });
 | 
			
		||||
            if (self.bracketed_paste) {} else if (self.dispatch_input) |f| f(self.handler_ctx, cbor_msg);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue