INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Keyboard mapping switch tabs  (Read 2171 times)

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Keyboard mapping switch tabs
« on: February 17, 2022, 09:12:44 am »

I would like to use a set of buttons on my mouse to switch tabs in MC.  My mouse can take key strokes as mouse button assignments, so it's easy to do.  For example, MC uses ctrl-tab to move forward in MC tabs.  This is the same as most web browsers.  So it should just work right?

But it doesn't because in the Mac version of MC "ctrl" means the key labeled "command" on the Mac keyboard.  Not the key labeled "control".  So this default keyboard shortcut (ctrl-tab) is inaccessible because Command-Tab is a built in shortcut in MacOS for switching between programs.  This shortcut (command-tab) is effectively "eaten" by the OS and thus invisible.

I thought I would go remap this function (switching tabs) to another key, so went to the MCC reference.  I can't seem to find a core command that does that.  I suspect it's a built-in that's not user accessible.

So two questions:

1.  Can the control key on a Mac keyboard be used to remap keys in the Resource.xml file?  If so, what's the key name?
2.  Can tab switching be mapped to another key via some mechanism?


Brian.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Keyboard mapping switch tabs
« Reply #1 on: February 17, 2022, 09:33:48 am »

I would like to use a set of buttons on my mouse to switch tabs in MC.  My mouse can take key strokes as mouse button assignments, so it's easy to do.  For example, MC uses ctrl-tab to move forward in MC tabs.  This is the same as most web browsers.  So it should just work right?

But it doesn't because in the Mac version of MC "ctrl" means the key labeled "command" on the Mac keyboard.  Not the key labeled "control".  So this default keyboard shortcut (ctrl-tab) is inaccessible because Command-Tab is a built in shortcut in MacOS for switching between programs.  This shortcut (command-tab) is effectively "eaten" by the OS and thus invisible.

I thought I would go remap this function (switching tabs) to another key, so went to the MCC reference.  I can't seem to find a core command that does that.  I suspect it's a built-in that's not user accessible.

So two questions:

1.  Can the control key on a Mac keyboard be used to remap keys in the Resource.xml file?  If so, what's the key name?
2.  Can tab switching be mapped to another key via some mechanism?


Brian.
Seems like an exception should be made for that function to just use CTRL. I wonder if there are others?
I'm not aware of any other mechanism.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Keyboard mapping switch tabs
« Reply #2 on: February 17, 2022, 11:59:00 am »

Implemented that in a fairly generic way which will allow modifying the resources but in the meantime catches that particular key combo. It will be in MC29.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Keyboard mapping switch tabs
« Reply #3 on: February 17, 2022, 06:48:22 pm »

It would be nice if MC's Resources file didn't confuse the meaning of the control key across platforms.  But I think that horse it out of the gate that probably won't be changed any time soon.

Honestly the tab switching was just a small thing for me.  I appreciate you working on it.  :)

Alternatively a way to access the control key from Resources would be nice.  But I guess ultimately it's probably not super useful, especially if I can't remap the command (switch tabs) that I was ultimately after. 

Again, thank you for working on the switch tabs key mapping.  I'll look forward to seeing it in 29.

Brian.
Logged

bob

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 13875
Re: Keyboard mapping switch tabs
« Reply #4 on: February 18, 2022, 08:39:04 am »

It would be nice if MC's Resources file didn't confuse the meaning of the control key across platforms.  But I think that horse it out of the gate that probably won't be changed any time soon.

Honestly the tab switching was just a small thing for me.  I appreciate you working on it.  :)

Alternatively a way to access the control key from Resources would be nice.  But I guess ultimately it's probably not super useful, especially if I can't remap the command (switch tabs) that I was ultimately after. 

Again, thank you for working on the switch tabs key mapping.  I'll look forward to seeing it in 29.

Brian.
I did fix that specific one for now but you will also be able to use "MacCtrl" to mean the Mac control key in Resources in MC29.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8014
Re: Keyboard mapping switch tabs
« Reply #5 on: February 18, 2022, 01:49:04 pm »

I did fix that specific one for now but you will also be able to use "MacCtrl" to mean the Mac control key in Resources in MC29.

Oooooooohhhh.  Cool!

Thanks Bob.  :)

Brian.
Logged
Pages: [1]   Go Up