diff --git a/docs/MilkyTracker.html b/docs/MilkyTracker.html index 9b853dbf..2616978e 100644 --- a/docs/MilkyTracker.html +++ b/docs/MilkyTracker.html @@ -465,7 +465,7 @@

5. Keyboard shortcuts

By user request, MilkyTracker features two edit modes. You can switch between these in the Config screen (Misc. tab). To learn about the differences and which might better suit you, read the appropriate sections below. There are a couple of shortcuts that are the same for both modes so let's clear those out of the way first:

- Please note that under Mac OS X the Command key is used instead of the Ctrl key. + Please note that under Mac OS X the Command key can be used in addition to the Ctrl key.

diff --git a/src/tracker/cocoa/MTKeyTranslator.mm b/src/tracker/cocoa/MTKeyTranslator.mm index 375d3eb2..e097062b 100644 --- a/src/tracker/cocoa/MTKeyTranslator.mm +++ b/src/tracker/cocoa/MTKeyTranslator.mm @@ -90,7 +90,9 @@ + (pp_uint16)toVK:(unsigned short) keyCode case kVK_ANSI_KeypadEnter: return VK_DECIMAL; // Modifier keys - case kVK_Command: return VK_CONTROL; + case kVK_Command: + case kVK_Control: + case kVK_RightControl: return VK_CONTROL; case kVK_Option: return VK_ALT; case kVK_RightCommand: return VK_RMENU; // MilkyTracker uses VK_RMENU for Play Pattern case kVK_RightOption: return VK_RCONTROL; // and VK_RCONTROL for Play Song @@ -208,4 +210,4 @@ + (pp_uint16)toSC:(unsigned short) keyCode } } -@end \ No newline at end of file +@end diff --git a/src/tracker/cocoa/MTTrackerView.mm b/src/tracker/cocoa/MTTrackerView.mm index 7a9b3779..4c432815 100644 --- a/src/tracker/cocoa/MTTrackerView.mm +++ b/src/tracker/cocoa/MTTrackerView.mm @@ -640,7 +640,16 @@ - (void)flagsChanged:(NSEvent*)theEvent case kVK_RightCommand: keyDown = flags & NSCommandKeyMask ? YES : NO; break; - + + // Control could RightControl if mapped to an alternative key (ie, Caps-Lock) + case kVK_Control: + case kVK_RightControl: + if (flags & NSEventModifierFlagControl) + setKeyModifier(KeyModifierCTRL); + else + clearKeyModifier(KeyModifierCTRL); + break; + // Only Left Option is used as a modifier case kVK_Option: if (flags & NSAlternateKeyMask)