Having trouble mapping Shift+Cmd

As a new Mac user, I find myself hitting Cmd+D in a terminal window a lot when I meant Ctrl+D. A lot. No big deal, I can reverse this with Shift+Cmd+D. That’s a pain to type on my Model01, though. So I figured I’d map Fn+Cmd to Shift+Cmd, like so:

  [FUNCTION] =  KEYMAP_STACKED
....
   ___, Key_Delete, LSHIFT(Key_LeftGui), ___,
...

This doesn’t do what I want. It doesn’t appear to do anything. If I manually press Cmd+LSHIFT+D it does what I want,so I’ve got the right key combination. Am I missing something obvious? Do I have to do this with OneShot?

eric

I bet that what is happening is that your new function layer trick isn’t capable of chording. Someone with more knowledge of the firmware might need to back me up on this, but when you put the Cmd key as the parameter to your modifier argument, that is being sent as a key PRESS event.

You could do several different things. Initially I was going to suggest that you modify the significance of that unwieldy shortcut on your Mac. You can assign any shortcut you want for any action that is in the menu bar: System Preferences, Keyboard, Shortcuts, App Shortcuts. Unfortunately this seems to be a shortcut that I can’t find in the menu bar of Terminal? I haven’t encountered that before.

Option number 2: Why not just change your Cmd to Ctrl on your Fn layer?

Probably because on macOS, most system shortcuts (e.g. copy & paste) use Command where Control would be used on Linux and Windows. The problem is that in the Terminal app, Control is used in the same way as it is in a terminal on UNIX-like systems. So he’s got two bad options – make frequent shortcut typos in Terminal, or make other shortcut typos everywhere else.

@ewosborne, I think what’s probably going on is that your shift+cmd key is working properly, but since you’ve activated the FUNCTION layer, your D key is not mapped to Key_D, but to something else (probably moving the mouse cursor). OneShot would be one way to solve the problem, but it doesn’t allow a single key to be both OneShot modifiers. You can achieve the effect with Macros, however. You could even write a Macro that does the whole shift+cmd+D when typing Fn+cmd or Fn+D.

The option I keep tripping over is View->Split Pane (Cmd+D).

Yup, you nailed it. I moved FUNCTION-D to Key_D, that did it for me. thanks!

1 Like