Possible to remap Ctrl + Y to Ctrl + Shift + Z? Topic is solved

The popular SciTE-based AutoHotkey Script Editor
downloaderfan
Posts: 34
Joined: 09 Jun 2017, 09:19

Possible to remap Ctrl + Y to Ctrl + Shift + Z?

04 Jan 2023, 16:42

Hello,

In other programs, I usually do undo/redo using Ctrl + Z and Ctrl + Shift + Z. But in SciTE, Ctrl + Shift + Z inserts a character called SUB instead of undoing. I've been using Scite for a few years now on an adhoc basis as I code on AHK itself on an adhoc basis due to which I've been unable to change this behaviour of mine. Is there a built in way to remap Ctrl + Y to Ctrl + Shift + Z?
Last edited by downloaderfan on 05 Jan 2023, 10:14, edited 1 time in total.
lexikos
Posts: 9679
Joined: 30 Sep 2013, 04:07
Contact:

Re: Possible to remap Ctrl + Y to Ctrl + Shift + Z?  Topic is solved

04 Jan 2023, 19:12

Yes, you can use the s4ahk.user.shortcuts property.

Code: Select all

s4ahk.user.shortcuts=\
Ctrl+Shift+Z|IDM_REDO|
This has the same syntax as user.shortcuts. S4A uses user.shortcuts itself (in SciTEGlobal.properties) to define some standard S4A-specific shortcuts.

I already have ^+z::Send ^y for some other apps, so I apply it to all Scintilla controls, regardless of the app.
downloaderfan
Posts: 34
Joined: 09 Jun 2017, 09:19

Re: Possible to remap Ctrl + Y to Ctrl + Shift + Z?

05 Jan 2023, 10:13

lexikos wrote:
04 Jan 2023, 19:12
Yes, you can use the s4ahk.user.shortcuts property.

Code: Select all

s4ahk.user.shortcuts=\
Ctrl+Shift+Z|IDM_REDO|
This has the same syntax as user.shortcuts. S4A uses user.shortcuts itself (in SciTEGlobal.properties) to define some standard S4A-specific shortcuts.

I already have ^+z::Send ^y for some other apps, so I apply it to all Scintilla controls, regardless of the app.
Thanks. Adding

Code: Select all

s4ahk.user.shortcuts=\
Ctrl+Shift+Z|IDM_REDO|
to SciTEUser.properties did the trick. :bravo:

Return to “SciTE4AutoHotkey”

Who is online

Users browsing this forum: No registered users and 8 guests