Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remap Eject key #3

Closed
omgmog opened this issue Apr 25, 2013 · 6 comments
Closed

Remap Eject key #3

omgmog opened this issue Apr 25, 2013 · 6 comments

Comments

@omgmog
Copy link

omgmog commented Apr 25, 2013

I've removed the superdrive from my MBP to fit an SSD, so my eject key is pretty useless. Can this be modified to support mapping of the eject key to forwards delete?

@asmeurer
Copy link

You can just use KeyRemap4MacBook plus NoEjectDely for that.

@pkamb
Copy link
Owner

pkamb commented Apr 25, 2013

Try running the Xcode project, and un-commenting the NSLog that prints the details of a key. We'll see what kind of events the Eject key sends.

@paradox460
Copy link

👍

@omgmog
Copy link
Author

omgmog commented Apr 26, 2013

@pkamb Here's a sample with me mashing the eject key:

2013-04-26 09:42:42.989 PowerKey[8182:303] EVENT: type:14 subtype:7, eventData:1, keyCode:0, keyFlags:1, keyState:0, keyRepeat:1
2013-04-26 09:42:43.112 PowerKey[8182:303] EVENT: type:14 subtype:7, eventData:1, keyCode:0, keyFlags:1, keyState:0, keyRepeat:1
2013-04-26 09:42:45.247 PowerKey[8182:303] EVENT: type:14 subtype:10, eventData:0, keyCode:0, keyFlags:0, keyState:0, keyRepeat:0
2013-04-26 09:42:45.247 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920064, keyCode:14, keyFlags:2560, keyState:1, keyRepeat:0
2013-04-26 09:42:45.248 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920320, keyCode:14, keyFlags:2816, keyState:0, keyRepeat:0
2013-04-26 09:42:45.478 PowerKey[8182:303] EVENT: type:14 subtype:10, eventData:0, keyCode:0, keyFlags:0, keyState:0, keyRepeat:0
2013-04-26 09:42:45.479 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920064, keyCode:14, keyFlags:2560, keyState:1, keyRepeat:0
2013-04-26 09:42:45.479 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920320, keyCode:14, keyFlags:2816, keyState:0, keyRepeat:0
2013-04-26 09:42:46.767 PowerKey[8182:303] EVENT: type:14 subtype:10, eventData:0, keyCode:0, keyFlags:0, keyState:0, keyRepeat:0
2013-04-26 09:42:46.767 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920064, keyCode:14, keyFlags:2560, keyState:1, keyRepeat:0
2013-04-26 09:42:46.768 PowerKey[8182:303] EVENT: type:14 subtype:8, eventData:920320, keyCode:14, keyFlags:2816, keyState:0, keyRepeat:0

@pkamb pkamb modified the milestones: v1.3, v1.2 Apr 22, 2014
@pkamb
Copy link
Owner

pkamb commented Nov 21, 2015

Thanks! The pertinent events for the Eject key are the ones below. Very similar to the power key events.

EVENT: type:14 subtype:10, eventData:0, keyCode:0, keyFlags:0, keyState:0, keyRepeat:0
EVENT: type:14 subtype:8, eventData:920064, keyCode:14, keyFlags:2560, keyState:1, keyRepeat:0
EVENT: type:14 subtype:8, eventData:920320, keyCode:14, keyFlags:2816, keyState:0, keyRepeat:0

Those work out to have these properties:

Event 1: [type: NSSystemDefined], [subtype: NX_SUBTYPE_EJECT_KEY]
Event 2: [type: NSSystemDefined], [subtype: NX_SUBTYPE_AUX_CONTROL_BUTTONS], [keyCode: NX_POWER_KEY], [keyState: keyDown];
Event 3: [type: NSSystemDefined], [subtype: NX_SUBTYPE_AUX_CONTROL_BUTTONS], [keyCode: NX_POWER_KEY], [keyState: keyUp];

@pkamb
Copy link
Owner

pkamb commented Nov 21, 2015

I've added eject key remapping support to the ejectKey branch, but I don't really have a way to test this myself. If anyone on this thread has a Macbook with an eject key, would you be able to test? Thanks!

This will be released in the next version.

@pkamb pkamb closed this as completed in b1a0ff7 Dec 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants