Cmd-Shift-Delete?

I implemented that, but the keyboard shortcut does not works (do nothing).

But using the menu with the Mouse works fine.

Here’s the Properties:

NB: I tried some variations of Bksp (this is to avoid telling me… “use Del” or “Use Delete“: I already checked.
Also, I have a Clear MenuItem implemented using Bksp… and it works when I press Cmd-Delete on the Keyboard.


You can use either a printable key or the following non-printable keys as shortcut keys: F1-F15, Tab, Enter, Space, Del (Delete), Return, Bksp (Backspace), Esc, Clear, PageUp, PageDown, Left, Right, Up, Down, Help, and Ins (Insert).

Ideas ?

In the window opening Event add a shortcut for the menu command:

EditDeleteAll.Shortcut = "CMD-Shift-Del"

or

EditDeleteAll.Shortcut = "CMD-Shift-Backspace"

(I have both a delete key, and a backspace key on my keyboard)

https://documentation.xojo.com/versions/2022r3/api/user_interface/desktop/desktopmenuitem.html#desktopmenuitem-shortcut

I’m pretty sure Alt-Menu-Modifier isn’t Shift (certainly not on a Mac) it is the Option key.

I would appear to be wrong, it does seem to offer shift when selected. It does, however, seem to work correctly on a window. Perhaps there is a control type that is eating the key press and preventing the menu from being called. TextArea would be a possible candidate. No, that still seems to operate correctly. I added a menu item set the shortcut using the IDE as shown. Added a menu handler and placed a breakpoint in it. All operates as expected.

Actually, looking again I set the key to “Backspace”.

@Mark_Sweeney and @Ian_Kennedy

Thank you for your answers.

I tried all of these.

What is “funny” is… Cmd-Del works fine (if there is one or more Selected Rows.
Yes, I delete Rows from a ListBox.

I check the code for Sortcut I use and here it is:
Sub Open() Handles Open
EditDeleteAll.Shortcut = “Cmd-Del”
End Sub

I set that in the ListBox sub-class. I try in the window where I use it…
This does not change.

What if I delete the other “Cmd-Backspace” Menu Handler ?
Same: does not works.

You ought to see if there’s a system keyboard shortcut that conflicts:

Choose Apple menu > System Preferences, click Keyboard, then click Shortcuts.

Hi Greg,

There are two Shortcuts:
Keyboard Shortcut (a Button)
Shortcut (a PopupMenu)

No conflict.

BTW: in the IDE, I have:
image

But while running in the IDE, I have:
image

Same as in Edit.Clear.

With: EditDeleteAll.Shortcut = "Cmd-Shift-Del"
I get the correct icons (Cmd-Shift-Del).

Edit.Clear: it clears the selection and Beep if no Selection; if I select all rows, it remove them all :wink:

Last: I get a Beep when I press Cmd-Shift-Delete key

m1 / Ventura 13.0.1 / Xojo 2021r2.1 (if that matter).

PS: good idea.

PPS: I understand why I was feeling insecure in System Preferences… the list (on the left) is not alphabetized, and si-o it is hard to reach what you’re searching (before today, it was Updates, in General, I suppose ,- it is named Général here in French).

If you right-click on System Preferences in the dock, you’ll get an alphabetized popup list of all the System Preferences.

1 Like

Thank you for that Info. And the list is alphabetized !

One tip from me…

QuickLook (select an item in the Finder and press the space bar):
When you are looking at an image, you can enlarge (and the reverse) with a two fingers gesture. Excepted when the item is in the item Rename state.
And you can enlarge or reduce the image using:
Cmd-+ (plus) and Cmd-- (minus) in the US QWERTY keyboard. And with the French keyboard, the printing is °/) (decrease) and -_ (Increase) :wink:

1 Like

You can also use quicklook in dialog boxes (Open, Save, etc):
Video of Quicklook in an open file dialog

1 Like