1

If I happen to press the Insert key when connected to a remote Mac from another Mac via Apple Remote Desktop, I loose the ability to send further keystrokes to the remote computer.

Whilst in this 'mode':

  • the remote computer stops responding to any keyboard input (but mouse input works as normal)
  • the mouse cursor changes to a question mark when hovering over things like text fields (within programs on the remote host).
  • typing continues to work as normal within programs on the local machine (just not the via the remote session).
  • closing and reconnecting to the remote host does not resolve the problem.

I happen to be using a non-Apple branded, but otherwise fairly standard usb keyboard (with a Windows key).

The only way I've found to recover from this is to use the mouse to log the remote user out of the remote computer, then log back in.

What's going on here? Can I resolve the problem without having to log out? What can I do to prevent entering this 'mode' in the first place?

4 Answers 4

3

Based on comments posted here:

https://apple.stackexchange.com/a/283253/49809

and the key map posted here:

https://developer.apple.com/library/archive/technotes/tn2450/_index.html

I wrote a shell script that maps the Insert key to the left arrow:

#!/bin/sh

# the Insert key on a Windows Keyboard
src=49

# the left arrow
dst=50

hidutil property --set "{\"UserKeyMapping\":
    [{\"HIDKeyboardModifierMappingSrc\":0x7000000$src,
      \"HIDKeyboardModifierMappingDst\":0x7000000$dst}]
}"

I saved the script in my bin folder under the name "remap-key.sh", made it executable by opening Terminal and running the command:

chmod +x ~/bin/remap-key.sh

ran it, and launched Remote Desktop. When I "accidentally" hit Insert while working in the remote window, it just moved the cursor one spot left (whew!).

To run the script every time I log in, I launched System Preferences, clicked the Login Items tab, and added the script to my Login Items. I think I can quit worrying about accidentally pressing Insert in the middle of a presentation!

This solution is less than ideal because it re-maps the key for every Mac application, not just Remote Desktop. I personally haven't noticed a Mac application that uses the Windows Insert key, though, so for me the problem is hypothetical. If you find a Mac application that actually uses Insert, an ugly solution would be a script that de-maps the Insert key back to its original key code. If I ever run into that problem, I'll edit this post.

Thanks to Tetsujin for the critical hint!

1

Mac keyboards don't have an Insert key, nor does a Mac know what to do with one if you press it locally from a Windows keyboard... so analysing what it thinks it has sent might be tricky.

A start-point might be to get hold of Key Codes (freeware), install on both machines & see what key is read by each.

0

I use Karabiner Elements and was simply able to disable the Insert key altogether.

The hardest part was discovering that it was actually the insert key causing the problem. The problem would appear so infrequently that I didn't realize I was tapping the insert key when trying to hit backspace.

Eventually I just decided to press all the keys in that region of the keyboard to figure out which key was causing the problem.

From there, it was a snap to configure Karabiner to ignore the key.

0

Here's a brilliant solution (copied below, original here) for if you get stuck in Overtype mode (rather than Insert mode) on Remote Desktop, from a Mac.

I just ran into this issue and had to experiment a bit until I found a solution. Using a Magic Keyboard, I am able to send an insert key by pressing clear to toggle the number lock on (depending on what application you're using, there may not be any feedback), then pressing 0 on the number pad:

clear+0

I'm not sure if the same trick would work on other keyboards, or how you would do this without a number pad, but hopefully this helps some users.

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .