Keyboard input directed always to Windows

Discussion in 'Windows Virtual Machine' started by JippoT, Nov 3, 2011.

Thread Status:
Not open for further replies.
  1. JippoT

    JippoT Bit poster

    Messages:
    9
    Is it possible to have all keyboard access directed to Windows (running inside OSX)? Now I have to mouse click something that belongs to Windows before keyboard is directed there. I want to direct strokes to Windows even if it's just running in the "background".

    It would also be great if it worked both ways; if keystrokes generated in Windows would affect OSX, but that's secondary. This way I could use Windows AutoHotkey to do things in OSX, as I'm accustomed to AutoHotkey.
     
  2. JippoT

    JippoT Bit poster

    Messages:
    9
    I'll answer this myself. You need KeyRemap4MacBook and Quicksilver to do something like this. Here's an example how to direct alt+tab always to Parallels:

    (1) Use this private.xml which changes Option+Tab to Option+F13,Option+Tab.
    https://github.com/tekezo/Files/blo...tion_tab_to_option_f13_option_tab/private.xml

    Note: How to use private.xml.
    http://pqrs.org/macosx/keyremap4macbook/document.html#t3


    (2) Assign Option+F13 to change active application to Virtual Machine.
    Use Quicksilver or other hot key apps.
    For example, use Quicksilver and assign Option+F13 as trigger.
    https://github.com/tekezo/Files/blob/master/KeyRemap4MacBook/image/quicksilver.png
    (You can register Option+F13 as hot key by pressing Option+Tab.)

    Explanation: KeyRemap4MacBook listens to your keypresses, sends the keypress to Quicksilver which triggers Parallels Windows focus and also send your keys there. The example is for alt+tab only, not for all keys.
     
  3. JippoT

    JippoT Bit poster

    Messages:
    9
    That wasn't very good, here's a new version (KeyRemap4MacBook), which works nicely for alt+tab (option+tab) Windows app selector even if the focus was in OSX.

    <item>
    <name>not VM: Option(shift)+Tab to F6,Option(shift)+Tab</name>
    <identifier>private.if_not_in_vn_then_option-tab_to_f6_option-tab</identifier>
    <block>
    <not>VIRTUALMACHINE</not>
    <autogen>--KeyToKey-- KeyCode::TAB, VK_OPTION | ModifierFlag::NONE,
    KeyCode::F6, KeyCode::TAB, VK_OPTION</autogen>
    <autogen>--KeyToKey-- KeyCode::TAB, VK_OPTION | VK_SHIFT | ModifierFlag::NONE,
    KeyCode::F6, KeyCode::TAB, VK_OPTION | VK_SHIFT</autogen>
    </block>
    <block>
    <only>VIRTUALMACHINE</only>
    <!-- the following is a workaround to get alt+esc (exit app selector) working -->
    <autogen>--KeyToKey-- KeyCode::ESCAPE, VK_OPTION | ModifierFlag::NONE,
    KeyCode::CONTROL_L, VK_OPTION</autogen>
    </block>
    </item>

    Note that the F6 is a Parallels option (Parallels Preferences -> Keyboard -> F6 Show/Hide Application).
     
Thread Status:
Not open for further replies.

Share This Page