win32 gui: remove bespoke/incorrect key translation
I played around with the API a bit and I tried out the other approach where instead of trying to implement our own keyboard translation, instead I just clear the "control key" before calling ToUnicode. This fixes any weird translation the OS was doing. With this change, we no longer need to skip calling ToUnicode if the control or alt keys are down, so keys will always work the same way whether or not these modifiers are down.
This commit is contained in:
		
							parent
							
								
									4c73948068
								
							
						
					
					
						commit
						d90d82a4b7
					
				
					 3 changed files with 25 additions and 40 deletions
				
			
		| 
						 | 
				
			
			@ -2,7 +2,7 @@
 | 
			
		|||
    "normal": {
 | 
			
		||||
        "press": [
 | 
			
		||||
            ["ctrl+g", "cancel"],
 | 
			
		||||
            ["ctrl+shift+-", "undo"],
 | 
			
		||||
            ["ctrl+shift+_", "undo"],
 | 
			
		||||
            ["ctrl+k", ["select_end"], ["cut"]],
 | 
			
		||||
            ["ctrl+w", "cut"],
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -14,8 +14,10 @@
 | 
			
		|||
            ["alt+f", "move_word_right"],
 | 
			
		||||
            ["ctrl+a", "move_begin"],
 | 
			
		||||
            ["ctrl+e", "move_end"],
 | 
			
		||||
            ["alt+shift+,", "move_buffer_begin"],
 | 
			
		||||
            ["alt+shift+.", "move_buffer_end"],
 | 
			
		||||
            ["alt+<"        , "move_buffer_begin"],
 | 
			
		||||
            ["alt+shift+<"  , "move_buffer_begin"],
 | 
			
		||||
            ["alt+gt"      , "move_buffer_begin"],
 | 
			
		||||
            ["alt+shift+gt", "move_buffer_end"],
 | 
			
		||||
            ["alt+v", "move_page_up"],
 | 
			
		||||
            ["ctrl+v", "move_page_down"],
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -23,7 +25,7 @@
 | 
			
		|||
            ["ctrl+d", "delete_forward"],
 | 
			
		||||
            ["alt+d", ["select_word_right"], ["cut"]],
 | 
			
		||||
            ["ctrl+y", "system_paste"],
 | 
			
		||||
            ["ctrl+x>ctrl+f", "open_recent"],
 | 
			
		||||
            ["ctrl+x>ctrl+f", "open_file"],
 | 
			
		||||
            ["ctrl+x>k", "close_file"],
 | 
			
		||||
            ["ctrl+x>ctrl+c", "quit"],
 | 
			
		||||
            ["ctrl+x>ctrl+s", "save_file"],
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue