forked from Bananymous/banan-os
				
			LibInput: Fix numpad keycode generation
I had made this function with broken PS/2 scancode set 3, so it seemed like it worked
This commit is contained in:
		
							parent
							
								
									6560f229b1
								
							
						
					
					
						commit
						95b353dae5
					
				|  | @ -22,15 +22,15 @@ namespace LibInput | ||||||
| 	consteval uint8_t keycode_normal(uint8_t row, uint8_t col) | 	consteval uint8_t keycode_normal(uint8_t row, uint8_t col) | ||||||
| 	{ | 	{ | ||||||
| 		BANAN_CONSTEVAL_STATIC_ASSERT(row <= 0b111 - 1); | 		BANAN_CONSTEVAL_STATIC_ASSERT(row <= 0b111 - 1); | ||||||
| 		BANAN_CONSTEVAL_STATIC_ASSERT(col < 0b11111 - 8); | 		BANAN_CONSTEVAL_STATIC_ASSERT(col <= 0b11111 - 8); | ||||||
| 		return ((row + 1) << 5) | col; | 		return ((row + 1) << 5) | col; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	consteval uint8_t keycode_numpad(uint8_t row, uint8_t col) | 	consteval uint8_t keycode_numpad(uint8_t row, uint8_t col) | ||||||
| 	{ | 	{ | ||||||
| 		BANAN_CONSTEVAL_STATIC_ASSERT(row <= 0b111 - 1); | 		BANAN_CONSTEVAL_STATIC_ASSERT(row <= 0b111 - 1); | ||||||
| 		BANAN_CONSTEVAL_STATIC_ASSERT(col <= 8); | 		BANAN_CONSTEVAL_STATIC_ASSERT(col < 8); | ||||||
| 		return ((row + 1) << 5) | (col + 0b11111 - 8); | 		return ((row + 1) << 5) | (col + 0b11111 - 8 + 1); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	enum class Key | 	enum class Key | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue