UTM icon indicating copy to clipboard operation
UTM copied to clipboard

Del and Insert key not working on Mac VM

Open 0x0Koda opened this issue 3 years ago • 17 comments

The del and insert key are not working on my usb keyboard in the Mac VM I'm using a keychron c2 keyboard. I've tried adding new keyboards in settings but nothing seems to work.

Configuration

  • UTM Version: Version 3.2.3 (57)
  • OS Version: Mac 12.3.1
  • VM Version: Mac 12.4
  • Apple Silicon

0x0Koda avatar May 19 '22 22:05 0x0Koda

Are you using the USB capture or are you using it directly?

osy avatar May 19 '22 22:05 osy

I'm just using the USB directly into the MAC. Additionally if i use the mac pro built in keyboard and i press fn+delete, this should also "del", this does not work inside the VM, So I think the VM just doesn't understand what "del" is.

0x0Koda avatar May 20 '22 22:05 0x0Koda

What OS are you running in the VM? Can you try a different OS? What locale and layout is your keyboard?

osy avatar May 21 '22 01:05 osy

VM Version: Mac 12.4 I've tried both Australian and US keyboard Layout is qwerty ctrl+D does work as forward delete

0x0Koda avatar May 21 '22 08:05 0x0Koda

Just tried on Ubuntu and the fn+delete key does work. VM Version: Ubuntu jammy jellyfish, Gnome 42

So its just a mac VM issue

0x0Koda avatar May 22 '22 01:05 0x0Koda

I have the same problem. US qwerty keyboard, Apple M1 2020 host running macOS 12.6.1, guest VM macOS 13.01. Host hardware has no keyboard attached but I'm connecting to it via VNC from Windows. Delete key works on host machine but not in VM. Ctrl-D works as forward delete.

dracoventions avatar Dec 04 '22 00:12 dracoventions

I have the same issue. Del key not recognized in VM. My main keyboard is a Keychron K2. But I've tried several others, both bluetooth and USB and it's the same result.

Mac Studio M1 Max MacOS 13.1 UTM 4.1.5 with Apple virtualization Debian 11 Fully patched and updated. I am using XFCE.

It's also worth noting that xev shows no X11 events for the Del key. All other keys work as expected.

lorddoomicus avatar Jan 20 '23 00:01 lorddoomicus

In my case at least this issue is limited to VMs that use Apple virtualization. For VMs that use QEMU the Insert and Delete keys work fine. This is for my external USB keyboard.

For my built-in keyboard the Delete key works regardless of the type of virtualization. (There is no built-in Insert key.)

griffint61 avatar Feb 06 '23 21:02 griffint61

Hm, same here indeed. Host is macOS 13.2.1 on arm64 (M1), VM is also macOS 13.2.1 on arm64. I have verified that on the host fn+delete on the built-in keyboard works, and gives the same keycode as the 'delete right' key on an external USB keyboard. However, these keys do nothing in the VM.

DimitryAndric avatar Mar 23 '23 16:03 DimitryAndric

Same here. Host: macOS 13.2.1/MacBook Pro/M1 Max Guest#1: macOS 13.2.1 (apple virtualization) Guest#2: Debian 11 (fully patched) (apple virtualization) USB Keyboard (Apple Keyboard with Numeric Keypad) Layout: German

del just does nothing in both cases

skiedrowski avatar Mar 26 '23 15:03 skiedrowski

Same here.

Using QEMU before, this USB keyboard used to work perfectly fine. After switching to Apple Virtualization the delete and insert keys just don't work.

UTM: 4.1.6 Host: MacOS 13.3 Guest: Debian 11 USB keyboard: Realforce R2SA-US4-IV Layout: US

vincent-olivert-riera avatar Apr 08 '23 03:04 vincent-olivert-riera

@osy , should we add an Apple Virtualization label to this issue?

vincent-olivert-riera avatar Apr 08 '23 06:04 vincent-olivert-riera

Among the new features of apple's virtualization framework for MacOS Sonoma, I see that a new class has appeared:

VZMacKeyboardConfiguration

Perhaps a solution to our ISO keyboard problems and better management of Mac keyboards? Even if it's too early (we're only in the first beta of Sonoma), are the UTM teams planning to integrate these new features in a future version of UTM?

naga-re avatar Jun 08 '23 20:06 naga-re

The problem ultimately remains with Sonoma (Beta 2). If the support of the function keys and controls of the Mac are appreciable (globe key, sound, multimedia, etc.), the bug of the bad mapping of the ISO keyboards (French, Danish, German, etc.) is unfortunately not always not corrected, while the keyboard works perfectly on the beta directly installed on a Mac, without going through a VM.

Explanation and solution of this bug:

The code for the @ key on a French ISO keyboard is 0Ah, but the code for this key on an ANSI keyboard is 32h (which is the code for the extra key < in ISO). That explains why I don't see the @. It's on the code key 0Ah which does not exist.

The virtualization framework does, for some reason that I cannot explain, this code replacement for the keys, taking into account neither the settings of the keyboard of the host machine, nor the settings of the keyboard of the virtual machine.

naga-re avatar Jun 25 '23 19:06 naga-re

Howard Oakley, from the excellent site The Eclecticlight Company has just published a post on this problem and made a bug report to Apple:

https://eclecticlight.co/2023/06/27/keyboard-layouts-in-lightweight-virtualisation/

naga-re avatar Jun 27 '23 18:06 naga-re

I am having the same issue in parallels desktop.

matthewruzzi avatar Jul 02 '23 23:07 matthewruzzi

I have the same issue. External USB keyboard connected to Mac M1. Guest OS -- MS DOS 6.22

aplsms avatar Jul 16 '24 11:07 aplsms

Same issue blocking NetWare installation. I can't send INSERT* key to an emulated PC. It should be FN+RETURN and, I see that on the virtual keyboard but it's not being sent to the guest OS.

  • NetWare uses a DOS menu system that makes use of INSERT and DELETE a lot.

michaelthwaite avatar Mar 10 '25 20:03 michaelthwaite

Found a fix: Hit '0' (zero) key on numeric keypad.

Either, emulate a soft Large ISO Keyboard on-screen, Settings / Accessibility / Text Input / Edit - Show input menu in menu bar = on) then create custom on-screen keyboard of type ISO (Large) or, plug in an old school big keyboard.

michaelthwaite avatar Mar 11 '25 14:03 michaelthwaite