@@ -7,13 +7,17 @@ import { describe, expect, it, vi } from "vitest";
77// sits at the physical QWERTY-"I" slot (event.code "KeyI"), which used to trigger the "mod+i"
88// Inbox shortcut and hijack Cmd+C.
99function press ( init : KeyboardEventInit ) : void {
10- document . dispatchEvent ( new KeyboardEvent ( "keydown" , { bubbles : true , ...init } ) ) ;
10+ document . dispatchEvent (
11+ new KeyboardEvent ( "keydown" , { bubbles : true , ...init } ) ,
12+ ) ;
1113}
1214
1315describe ( "react-hotkeys-hook layout-aware matching" , ( ) => {
1416 it ( "fires mod+i when the logical key is i" , ( ) => {
1517 const onInbox = vi . fn ( ) ;
16- renderHook ( ( ) => useHotkeys ( "mod+i" , onInbox , { enableOnContentEditable : true } ) ) ;
18+ renderHook ( ( ) =>
19+ useHotkeys ( "mod+i" , onInbox , { enableOnContentEditable : true } ) ,
20+ ) ;
1721
1822 press ( { key : "i" , code : "KeyI" , metaKey : true } ) ;
1923
@@ -22,7 +26,9 @@ describe("react-hotkeys-hook layout-aware matching", () => {
2226
2327 it ( "does not fire mod+i on a Dvorak Cmd+C that lands on the physical KeyI slot" , ( ) => {
2428 const onInbox = vi . fn ( ) ;
25- renderHook ( ( ) => useHotkeys ( "mod+i" , onInbox , { enableOnContentEditable : true } ) ) ;
29+ renderHook ( ( ) =>
30+ useHotkeys ( "mod+i" , onInbox , { enableOnContentEditable : true } ) ,
31+ ) ;
2632
2733 press ( { key : "c" , code : "KeyI" , metaKey : true } ) ;
2834
0 commit comments