pqrs-org / Karabiner-archived

Karabiner (KeyRemap4MacBook) is a powerful utility for keyboard customization.
https://pqrs.org/osx/karabiner/
The Unlicense
3.82k stars 309 forks source link

Request: map Command to Control in wine app #250

Closed simonweil closed 10 years ago

simonweil commented 10 years ago

Is this possible? Can I do it on my own?

P.S. Thank you for a very useful tool!

tekezo commented 10 years ago

Search "wineskin" on Preferences and enable "Swap left command key and left control key in Wineskin".

Or use this private.xml.

<?xml version="1.0"?>
<root>
  <item>
    <name>Enable at only Wineskin</name>
    <item>
      <name>Swap left command key and left control key in Wineskin</name>
      <identifier>private.wine_swap_command_control</identifier>
      <only>WINESKIN</only>
      <autogen>__KeyToKey__ KeyCode::COMMAND_L, KeyCode::CONTROL_L</autogen>
      <autogen>__KeyToKey__ KeyCode::CONTROL_L, KeyCode::COMMAND_L</autogen>
    </item>
  </item>
</root>
simonweil commented 10 years ago

I'm talking about wine installed via brew: brew install wine --devel not wineskin. Is there any way to do this setting for wine?

tekezo commented 10 years ago

Unfortunately, the native wine is lacking mac app's information. So, there is not a way to detect whether wine is focused or not.

simonweil commented 10 years ago

Oh, that is sad... Can you direct me to info about Mac app's information so I can open a feature request for wine?

tekezo commented 10 years ago

Info.plist is required. https://developer.apple.com/library/mac/documentation/general/Reference/InfoPlistKeyReference/Introduction/Introduction.html#//apple_ref/doc/uid/TP40009248-SW1

I think using Wineskin is an easiest way.

simonweil commented 10 years ago

Thank you!

Just for the record, here is the request in the wine project: http://bugs.winehq.org/show_bug.cgi?id=37047

If anyone is interested in it happening add yourself to the CC list in the bug.

KenThomases commented 10 years ago

Wine is not a bundle app, but it does have an Info.plist embedded in it as described here.