hammerspoon2-docs
    Preparing search index...

    Variable followsKeyboardLayout

    followsKeyboardLayout: boolean

    Whether hotkeys from bindHotkey() that were bound with a key name move to a different key when the keyboard layout changes, so that they stay on the key that types that character. Default is true.

    For example, a hotkey bound to "w" matches the key US-ANSI calls W while a US layout is active, and the key US-ANSI calls , after you switch to Dvorak, since that's where Dvorak types w. Hotkeys bound with a numeric key code never move.

    When false, a hotkey stays on whichever key its name resolved to when it was bound. Setting this back to true moves existing hotkeys to the current layout. This is separate from hs.hotkey.followsKeyboardLayout, which controls hs.hotkey hotkeys.

    Avoid binding some hotkeys by key name and others by numeric key code with the same modifiers if you switch layouts. If a hotkey moves onto a key code another hotkey already matches, only the one that was enabled first fires.