Re: [w3c/uievents] Proposal: Provide OS specific shortcut key (Issue #412)

tats-u left a comment (w3c/uievents#412)

```js
event.primaryModKey = isAppleDevice ? event.metaKey : event.ctrlKey;
navigator.primaryModKeyLabel = isAppleDevice ? { full: "Command", text: "Cmd", short: "⌘", symbol: "⌘" } : { full:  "Control", text: "Ctrl", short: "Ctrl", symbol: "^" };
navigator.primaryModKeyLabel.toString = function() { return this.short };
```

```js
(globalThis.alert ?? console.log)(`Press ${navigator.primaryModKeyLabel} + V to paste`);
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/uievents/issues/412#issuecomment-4840182997
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/uievents/issues/412/4840182997@github.com>

Received on Tuesday, 30 June 2026 05:26:25 UTC