Run on specific keyboard

let say i have 2 keyboard, can i have my script only run on my other keyboard, but not other ?

I don't know if there is a way to do this solely with KM.

But you could definitely map a second keyboard so each of its keys is distinguishable from the main keyboard using Karabiner-Elements. Then KM could detect the different keyboards as unique.

1 Like

ok let say i remap 1 to numpad 1, KM still read it as numpad 1 whatever the keyboard ?

See the "Target Device" dropdown box above. WIth Karabiner, you can enter key remappings specific to one keyboard.

So on your alternate keyboard, you might remap 1 to F20 (which may not even physically be on either keyboard). Then configure KM to recognize F20 as a hotkey trigger.