Created
September 1, 2022 18:31
-
-
Save tmcw/8a15d805ba55af6209cd3ed22573199a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function useMapKeybindings() { | |
const rep = usePersistence(); | |
const historyControl = rep.useHistoryControl(); | |
const transact = rep.useTransact(); | |
useHotkeys( | |
"Command+z, Ctrl+z", | |
(e) => { | |
e.preventDefault(); | |
historyControl("undo"); | |
return false; | |
}, | |
[historyControl] | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment