[Poker 2] Change Right Control key to Media Eject OSX
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
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.
- moley
- Location: UK
- Main keyboard: poker 2
- Main mouse: apple magic
- Favorite switch: mx brown
- DT Pro Member: -
I'm a bit of a n00b when it comes to stuff like that.Khers wrote: ↑I think you should be able to configure your own xml file in Karabiner to get that
If you can show me how, I'll be very grateful.
- Muirium
- µ
- Location: Edinburgh, Scotland
- Main keyboard: HHKB Type-S with Bluetooth by Hasu
- Main mouse: Apple Magic Mouse
- Favorite switch: Gotta Try 'Em All
- DT Pro Member: µ
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:
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.
Code: Select all
SYSTEM_POWER 0xA8 System Power
SYSTEM_SLEEP 0xA9 System Sleep
- Khers
- ⧓
- Location: Sweden
- Main keyboard: LZ CLSh
- Main mouse: Logitech MX Ergo
- Favorite switch: Buckling Springs | Topre | Nixdorf Black
- DT Pro Member: 0087
I don't have a right ctrl on the laptop I'm at atm , so I instead changed right cmd plus option to have the behaviour I think you're after. Try putting this in your private.xml: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.
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>
- moley
- Location: UK
- Main keyboard: poker 2
- Main mouse: apple magic
- Favorite switch: mx brown
- DT Pro Member: -
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.
It comes up with the following error message:
Error in XML.
----------------------------------------
Unknown symbol:
KeyCode::ModifierFlag::CONTROL_R
----------------------------------------
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>
Error in XML.
----------------------------------------
Unknown symbol:
KeyCode::ModifierFlag::CONTROL_R
----------------------------------------
- Khers
- ⧓
- Location: Sweden
- Main keyboard: LZ CLSh
- Main mouse: Logitech MX Ergo
- Favorite switch: Buckling Springs | Topre | Nixdorf Black
- DT Pro Member: 0087
I think you're just defining things in the wrong order. Try this instead:
Looks a bit goofy, but the sleep command does not seem to take with ModifierFlag::NONE
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>