mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	HID: input: add mapping for "Toggle Display" key
According to HUT 1.12 usage 0xb5 from the generic desktop page is reserved for switching between external and internal display, so let's add the mapping. Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
		
							parent
							
								
									afbbaa1bc0
								
							
						
					
					
						commit
						c01908a14b
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		| 
						 | 
					@ -677,6 +677,14 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if ((usage->hid & 0xf0) == 0xb0) {	/* SC - Display */
 | 
				
			||||||
 | 
								switch (usage->hid & 0xf) {
 | 
				
			||||||
 | 
								case 0x05: map_key_clear(KEY_SWITCHVIDEOMODE); break;
 | 
				
			||||||
 | 
								default: goto ignore;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		/*
 | 
							/*
 | 
				
			||||||
		 * Some lazy vendors declare 255 usages for System Control,
 | 
							 * Some lazy vendors declare 255 usages for System Control,
 | 
				
			||||||
		 * leading to the creation of ABS_X|Y axis and too many others.
 | 
							 * leading to the creation of ABS_X|Y axis and too many others.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue