Pair Programming with Qwerty and Dvorak keyboard l

2019-04-01 00:34发布

问题:

Is it possible to plug in 2 keyboards and have one with Dvorak layout and the other with QWERTY layout? (On OSX)

回答1:

You can do this Linux in X Windows, and this may also apply OSX (another X Windows-based operating system).

Find the device ID of the keyboard to change:

$ xinput -list | grep -i key
⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Power Button                              id=7    [slave  keyboard (3)]
    ↳ LITEON Technology USB Keyboard            id=9    [slave  keyboard (3)]
    ↳ LITEON Technology USB Keyboard            id=10   [slave  keyboard (3)]

Then change the layout using setxkbmap:

$ setxkbmap -device 9 dvorak


回答2:

You can do it with any hard-wired Dvorak or remapable keyboard.

The Kinesis Advantage should do the trick. It has both QWERTY and Dvorak modes but it's quite expensive (300$) and the layout may not be for everyone.



回答3:

The open-source Karabiner-Elements solved this for me. It has a "Devices" tab that let's you specify which keyboards will get the new key mapping, or which ones should be ignored. So I leave my OS set to QWERTY, apply the Dvorak mapping to my keyboards, then leave my pair's keyboards unaffected.



回答4:

Not, as far as I know, using the basic OS X setup. If you want to modify a kext you can do it. I would suggest you get the Dvorak keyboard as hardware Dvorak, not software Dvorak, as in this case your setup will work as expected.



回答5:

I have my Kinesis hardware-mapped to Dvorak sitting on my desk, and a second keyboard sitting off to the side as a "guest" keyboard. The second keyboard is also handy for any games that assume that you use an antiquated layout.