mirror of
				https://github.com/excalidraw/excalidraw.git
				synced 2025-10-31 02:44:50 +01:00 
			
		
		
		
	Update send/bring shortcuts and show them properly per operating… (#784)
* Show proper shortcuts * sort * Add shortcuts to bring/send * fix hotkeys matching greedily * Space * align zindex shortcuts with figma * switch to event.code & change Darwin shortcuts Co-authored-by: dwelle <luzar.david@gmail.com>
This commit is contained in:
		
							
								
								
									
										10
									
								
								src/keys.ts
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								src/keys.ts
									
									
									
									
									
								
							| @@ -1,3 +1,5 @@ | ||||
| export const isDarwin = /Mac|iPod|iPhone|iPad/.test(window.navigator.platform); | ||||
|  | ||||
| export const KEYS = { | ||||
|   ARROW_LEFT: "ArrowLeft", | ||||
|   ARROW_RIGHT: "ArrowRight", | ||||
| @@ -7,14 +9,10 @@ export const KEYS = { | ||||
|   ESCAPE: "Escape", | ||||
|   DELETE: "Delete", | ||||
|   BACKSPACE: "Backspace", | ||||
|   get META() { | ||||
|     return /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) | ||||
|       ? "metaKey" | ||||
|       : "ctrlKey"; | ||||
|   }, | ||||
|   CTRL_OR_CMD: isDarwin ? "metaKey" : "ctrlKey", | ||||
|   TAB: "Tab", | ||||
|   SPACE: " ", | ||||
| }; | ||||
| } as const; | ||||
|  | ||||
| export function isArrowKey(keyCode: string) { | ||||
|   return ( | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Lipis
					Lipis