Karabiner: How can I program a combination to open an appli

User avatar
moley

18 Nov 2014, 23:24

I've been trying to edit the private.xml so by pressing O + L an application opens... but so far no luck.

This is what I've come up with:

Code: Select all

<?xml version="1.0"?>
<root>
 
<!-- Right Option Sleeps Display -->
<item>
    <name>R_Option for Display Sleep</name>
    <identifier>private.option_display_sleep</identifier>
    <autogen>__KeyToKey__ KeyCode::CONTROL_R, ModifierFlag::CONTROL_R, KeyCode::VK_CONSUMERKEY_EJECT, ModifierFlag::CONTROL_L | ModifierFlag::SHIFT_L </autogen>
</item>

<!-- Keys O + L Opens Logic Pro X -->

<vkopenurldef>
    <name>KeyCode::VK_OPEN_URL_APP_Logic_Pro_X/name>
    <url type="file">/Applications/Logic Pro X.app</url>
</vkopenurldef>

<item>
    <name>Change O + L to open Logic Pro X</name>
    <identifier>private.O_L</identifier>
    <autogen>
      __KeyToKey__
      KeyCode::O, KeyCode::L,
      KeyCode::VK_OPEN_URL_APP_Logic_Pro_X,
    </autogen>
  </item>

</root>
I get the following error message:

</Users/moley/Library/Application Support/Karabiner/private.xml>(28): unexpected end of data

Any clues as what I'm doing wrong?

Much appreciated...
:D

User avatar
Muirium
µ

19 Nov 2014, 00:48

You're using combos without any mods? (I'm guessing that's what O+L => Open Logic Pro is about.) That might be a problem. Try adding a mod just to see if that fixes it.

User avatar
moley

19 Nov 2014, 00:56

Hallo Mu!

O + S opens Safari, so I thought maybe O + x could open another app...

User avatar
Muirium
µ

19 Nov 2014, 01:23

Guess it should then! You just press those keys together? Is there a built in delay?

"Rolling shortcuts" are something I've been meaning to try, actually. I had ideas about hiding arrow keys in a 60% by double tapping them. But the Venerable Hasu tells me this is all kinds of tricky! You've got to get the timing just right so it doesn't fire by accident in normal typing.

User avatar
moley

19 Nov 2014, 01:31

Dunno about delay...

S+O to open Safari doesn't work.

I've tried pressing O then S as quickly as I can - opens Safari every time.

When I press O + S together it's pretty much 50/50 whether Safari opens.

User avatar
moley

19 Nov 2014, 01:59

I played some more with O + S and there does seem to be a delay.

User avatar
moley

19 Nov 2014, 16:45

Khers came to the rescue again….!

He suggested I use Shift + Cmd + L, which works perfectly.

Here's the code:

Code: Select all

<!-- Keys CMD_R + SHIFT_R + L Opens Logic Pro X -->

<vkopenurldef>
    <name>KeyCode::VK_OPEN_URL_APP_Logic</name>
    <url>file:///Applications/Logic%20Pro%20X.app</url>
</vkopenurldef>

<!--<item>-->
<!--<name>Hot Key Mapping</name>-->
  <item>
  <name>Open Applications Using Hot Keys</name>
    <item>
      <name>Change Shift Cmd L to open Logic Pro X</name>
      <identifier>private.O_L</identifier>
      <autogen>__KeyToKey__ KeyCode::L, ModifierFlag::COMMAND_R | ModifierFlag::SHIFT_R,  KeyCode::VK_OPEN_URL_APP_Logic</autogen>
    </item>
  </item>
<!—-</item>-->
Thanks all for your help

:D

Post Reply

Return to “Keyboards”