win: Fix the key code of Alt.
This commit is contained in:
		
					parent
					
						
							
								daa00e6539
							
						
					
				
			
			
				commit
				
					
						3d989b6736
					
				
			
		
					 1 changed files with 4 additions and 0 deletions
				
			
		|  | @ -550,8 +550,12 @@ void NativeWindowViews::HandleKeyboardEvent( | ||||||
|     const content::NativeWebKeyboardEvent& event) { |     const content::NativeWebKeyboardEvent& event) { | ||||||
|   if (menu_bar_autohide_ && |   if (menu_bar_autohide_ && | ||||||
|       (event.modifiers & content::NativeWebKeyboardEvent::AltKey) && |       (event.modifiers & content::NativeWebKeyboardEvent::AltKey) && | ||||||
|  | #if defined(USE_X11) | ||||||
|       // 164 and 165 represent VK_LALT and VK_RALT.
 |       // 164 and 165 represent VK_LALT and VK_RALT.
 | ||||||
|       (event.windowsKeyCode == 164 || event.windowsKeyCode == 165) && |       (event.windowsKeyCode == 164 || event.windowsKeyCode == 165) && | ||||||
|  | #else | ||||||
|  |       (event.windowsKeyCode == ui::VKEY_MENU) && | ||||||
|  | #endif | ||||||
|       (event.type == blink::WebInputEvent::RawKeyDown)) { |       (event.type == blink::WebInputEvent::RawKeyDown)) { | ||||||
|     SetMenuBarVisibility(!menu_bar_show_); |     SetMenuBarVisibility(!menu_bar_show_); | ||||||
|     Layout(); |     Layout(); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Cheng Zhao
				Cheng Zhao