Change keyboard shortcuts?

Ok, I took a break from Xojo, I’m back trying to use it without getting too distracted by its quirks, is there a setting somewhere to alter keyboard shortcuts?

Too many years of muscle memory to change my habits, amongst others, I’d like to change CTRL+R to F5 without having to install some key re-binding software.

I’ve had a quick look around the options, might it be in a file somewhere?

Thanks in advance

On a Mac you can use the Keyboard System Preferences, but it sounds like you’re on Windows? If so, I think the best answer is, soon.

<https://xojo.com/issue/6649>

Thanks Kem, yes I’m mainly on Windows.

Soon™ gotcha!

Wow, its been implemented, there’s me being all “Soon™” :wink:

Oh I’ll be testing the yazoo out of that one!

MenuItem-Name.KeyboardShortCut = “F5”

More data here: http://developer.xojo.com/menuitem

[quote=307403:@Emile Schwarz]MenuItem-Name.KeyboardShortCut = “F5”

More data here: http://developer.xojo.com/menuitem[/quote]

Thanks Emile, I was asking about the IDE though :slight_smile:

Sorry. I do not know for OS X / macOS (since ResEdit does not works).

And I never know how to do that under Windows.

On the Mac, go to System Preferences -> Keyboard, and choose the “Shortcuts” tab. Highlight “App Shortcuts” and add any application and menu item you’d like. Your choices there will override the app’s native keyboard shortcuts.

If a menu item appears more than once (for example, the Xojo IDE Scripts), you can be very specific with its path by using this form:

Menu->Submenu->SubSubMenu->Name

A real-world example… In RegExRX, you might want to assign a keystroke to copy the search pattern in Xojo form, so you would create a RegExRX entry that looks like this:

Edit->Copy Pattern As->Xojo/Real Studio->Search Pattern

The shortcut you assign will show up in the menus immediately.

When I want to programmatically assign the [ key to a MenuItem. But when I do so, it turns the MenuModifier on. So, on my Mac, it turns it into Command+[. And I just want to the single [.
Yet, in the documentation it says:

Am I doing something wrong here?

Just switch the modifier off after entering [.

Thanks. But I already know how the Menu-Editor works.
I want to change the shortcuts in runtime because some MenuItems share that same shortcut.

I will explain. I am working on a subtitle editor.

( I know, the timecode is not properly formatted in this example… not finished yet )
When I select a subtitle in the timeline I want to be able to use the [ and ] keys to trim the timecode-in and timecode-out to my cursor’s time location. But when I select a marker, in the “ruler-bar”, I want to be able to trim the timecodes of that marker using the same key.
When I select a marker, the selection of the titles is cleared. And when I select a title, the selection of the markers clear. When I use the EnableMenuItems event of the window, I can change the shortcuts of the MenuItems.

I could do a regular KeyDown event on the timeline canvases. But using the MenuItems seemed easier. Nevertheless, I find it weird that the MenuItems cannot be set at runtime, even though the docs say otherwise. That’s why I wonder if I do something wrong.