Skip to content

Instantly share code, notes, and snippets.

@phsantiago
Last active August 14, 2022 13:13
Show Gist options
  • Save phsantiago/dfebde4554001edd489509558377b6f9 to your computer and use it in GitHub Desktop.
Save phsantiago/dfebde4554001edd489509558377b6f9 to your computer and use it in GitHub Desktop.
command or control enter for react, working on mac and windows
const controlEnter = (e: React.KeyboardEvent) =>
(e.metaKey || e.ctrlKey) && e.which === 13;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment