[Poker 2] Change Right Control key to Media Eject OSX

User avatar
moley

06 Nov 2014, 22:15

Does anyone know how I can change the Right Control key on a Poker 2 so that it will trigger the Eject Media key?

Thanks for any pointers...

:D

User avatar
Khers

06 Nov 2014, 22:32

Have you tried Karabiner?

User avatar
moley

06 Nov 2014, 22:43

Thank you...

I've installed it and had a look, but I can't work out how to make Control_R key behave as Eject

It's a mystery!

User avatar
Muirium
µ

06 Nov 2014, 22:46

Probably a good place to look. I can't see the option in System Preferences > Keyboard > Shortcuts at least. Although holding F12 works on keyboards without an eject key.

User avatar
moley

06 Nov 2014, 22:47

Actually, perhaps it would be easier to say what I'd like to happen...

I'd like to set the ControlR key to shutoff the display

Shift+Option+Eject

User avatar
Khers

06 Nov 2014, 22:59

I think you should be able to configure your own xml file in Karabiner to get that

User avatar
moley

06 Nov 2014, 23:04

Khers wrote: I think you should be able to configure your own xml file in Karabiner to get that
I'm a bit of a n00b when it comes to stuff like that.

If you can show me how, I'll be very grateful.

:)

User avatar
Khers

06 Nov 2014, 23:10

Not very skilled in this either I'm afraid. Managed to make my keyboard do what I wanted in the end though. Can give it a try tomorrow :)

User avatar
moley

06 Nov 2014, 23:13

Khers wrote: Not very skilled in this either I'm afraid. Managed to make my keyboard do what I wanted in the end though. Can give it a try tomorrow :)
Thank you!

:D

User avatar
Muirium
µ

06 Nov 2014, 23:22

I've no experience with Karabiner (and I've no need to use it with my custom boards and controllers) but here's a tidbit that might make the task easier for you. The Command + Option + Eject = Sleep shortcut has been in OS X for donkeys years. (Try adding Control to the mix for some real fun!) But there's a key in the USB HID spec specifically to trigger system sleep. In fact, I think OS X accepts both of these:

Code: Select all

SYSTEM_POWER	0xA8	System Power
SYSTEM_SLEEP	0xA9	System Sleep
I use the System Power code in Soarer's Converter, so I have a power / sleep button on my Model M SSK etc. If Karabiner can send out any code you like, the macro might be irrelevant.

User avatar
moley

06 Nov 2014, 23:28

I don't want to make the system sleep, just turn off the display. No screensaver, just a blank screen...

I hope there's a way to do it. Simply. So a simple fellow like me can do it.

:D

User avatar
Khers

07 Nov 2014, 08:56

moley wrote: I don't want to make the system sleep, just turn off the display. No screensaver, just a blank screen...

I hope there's a way to do it. Simply. So a simple fellow like me can do it.

:D
I don't have a right ctrl on the laptop I'm at atm :o :o , so I instead changed right cmd plus option to have the behaviour I think you're after. Try putting this in your private.xml:

Code: Select all

<?xml version="1.0"?>
<root>
  <item>
    <name>R_CMD + R_Option for Eject</name>
    <identifier>private.cmd_option_eject</identifier>
    <autogen>__KeyToKey__ KeyCode::OPTION_R, ModifierFlag::COMMAND_R, KeyCode::VK_CONSUMERKEY_EJECT, ModifierFlag::OPTION_R | ModifierFlag::COMMAND_R </autogen>
  </item>
</root>

User avatar
moley

07 Nov 2014, 11:30

Thanks for this, we're getting somewhere….

I've had a play with Karabiner and sadly writing XML code is beyond me…

I'd like to have the Right Control key trigger Control + Shift + Eject

I've written the XML below, but it's not working. Can anyone tell me what I've done wrong?

Much appreciated.

Code: Select all

<?xml version="1.0"?>
<root>
  <item>
    <name>L_CNTL + L_Shift + Eject</name>
    <identifier>private.cntrl_shift_eject</identifier>
<autogen>
  __KeyToKey__
  KeyCode:: ModifierFlag::CONTROL_R,
  KeyCode:: ModifierFlag::CONTROL_L, ModifierFlag::SHIFT_L, KeyCode::VK_CONSUMERKEY_EJECT,
</autogen>
  </item>
</root>
It comes up with the following error message:

Error in XML.
----------------------------------------
Unknown symbol:

KeyCode::ModifierFlag::CONTROL_R
----------------------------------------

User avatar
Khers

07 Nov 2014, 13:31

I think you're just defining things in the wrong order. Try this instead:

Code: Select all

<root>
   <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>
</root>
Looks a bit goofy, but the sleep command does not seem to take with ModifierFlag::NONE

User avatar
moley

07 Nov 2014, 14:20

You absolute star!

Works a treat.

Thank you so much...

:D

User avatar
Khers

07 Nov 2014, 16:26

You're welcome! Glad it worked! :D

Post Reply

Return to “Keyboards”