Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: [1]   Go Down

Author Topic: OS X: Right-Cmd and Right-Opt keys!  (Read 6008 times)

0 Members and 1 Guest are viewing this topic.

syphus

  • New User
  • Offline Offline
  • Posts: 6
    • View Profile
    • http://syphus.untergrund.net
OS X: Right-Cmd and Right-Opt keys!
« on: October 08, 2011, 04:09:15 »

I'm just creating this thread as somewhere for any pertinent discussion to take place...but I've got the ball rolling on this issue by getting in touch with the Renoise team (who have figured out how to use these keys under OS X to control pattern-play/song-play in Renoise) and asking them if they're willing to share some code snippets with Milky chaps. They say yes and Deltafire has said he'll get in touch with them to discuss it - great news!

Anyway, assuming the secrets can be gleaned and incorporated into MilkyTracker, either by df or pailes, this thread will probably just be for comments or bug reports. Mods - feel free to move it around accordingly as this situation (hopefully) develops.

For anyone unfamiliar with the issue, it's nightmarishly difficult - for some reason - to map stuff to the Apple keyboard's Right-Cmd (applekey) and Right-Opt (alt) keys, which is a great shame for MilkyTracker as workflow under Windows and Linux is made so much smoother when your right thumb can be used to whack those PLAY!!!LOLZ!! buttons, just like in FastTracker, ProTracker, etc. Maybe it's because Apple really don't want you to use them for any non Apple-sanctioned functions, but whatever the reason, it doesn't really matter as the Renoise crew managed to figure it out a few years ago. Great that they're happy to share the trade secret though \o/
Logged

Deltafire

  • Milkytracker Moderator
  • Rising Star
  • *
  • Offline Offline
  • Posts: 196
    • View Profile
Re: OS X: Right-Cmd and Right-Opt keys!
« Reply #1 on: November 04, 2011, 20:28:23 »

Just been researching this, there is no easy way to obtain unique key-codes for the left/right modifier keys on OSX.  The difficult way is to create a new HID manager for the keyboard device, and setup a callback to handle input events; which sounds a lot easier than it is!

Some references for anyone feeling brave:

Introduction to Working With HID Class Device Interfaces
IOHIDManager.h
New HID Manager APIs for Mac OS X version 10.5
Virtual Awesome's HID manager interface
Logged
Pages: [1]   Go Up