Generic, keyboard-independed Cut Clipboard

I am working on a macro which uses the Cut action (cutting the selection to the clipboard). I run into trouble however, because Cut does not seem to do a real Cut but rather execute the keyboard short cut for Cut: cmd-X

I realised this in Emacs (Carbon build with GUI): Here cmd-X is mapped to a very different function (execute-extended-command) and surly the Cut action triggers in Emacs not a cut or similar, but execute-extended-command.

Is there a way to issues a real cut function instead of cmd-X?

Hey again Leo,

Does Emacs have a menu bar? If so, you could use a Select or Show a Menu Item action like this:

Thanks for your suggestion, Gabe.

Emacs very annoyingly disables Cut if the selection is in a non-modifiable area. So I guess there won’t be a unified approach for all GUI apps - I will have to test whether the foremost app is Emacs and do special handling for it…

BTW, what should be faster in KM: Issuing a menu event or typing a character with modifier keys.

No problem, Leo. I’m far from the best equipped to answer your last question, but that said, my understanding is that, while typing a shortcut may be slightly faster than a menu event, menu events are more precise (since different shortcuts can have different effects in different apps, but menu events can be set to always target just the app you want) and also have a failsafe of sorts that shortcuts don’t (because the menu event is, by default, set to abort the macro if the event is unable to find the menu command specified, whereas shortcuts are, from KM’s perspective, just arbitrary keystrokes), so I generally use menu events for app-specific commands rather than the app’s shortcuts.