Apologies if this has been answered before. (I assume that it has, but I couldn't find anything with search.)
Is it possible to change the keyboard shortcuts?
Specifically, I want to change the toggle comment shortcut. I like to make them all the same across all my editors/IDES. e.g., Ctrl + Q toggles comments in SciTE4AutoHotkey, but in R Studio it closes the software; you can probably imagine the problem here.
Change keyboard shortcuts
Re: Change keyboard shortcuts
I don't have SciTE4AutoHotkey installed anymore, so I can't check myself, but are its keyboard shortcuts available to be changed in the SciTEUser.properties file as described here?
Re: Change keyboard shortcuts
It might be possible, but I'm not sure what the available options are since there aren't any already in the file. This is all that's in it now.
Code: Select all
# User initialization file for SciTE4AutoHotkey
#
# You are encouraged to edit this file!
#
# Import the platform-specific settings
import _platform
# Import the settings that can be edited by the bundled properties editor
import _config
# Add here your own settings
Re: Change keyboard shortcuts
I found this:
here: https://www.scintilla.org/CommandValues.html
But still not sure how to assign a keyboard shortcut to it *and* if it masks the default keyboard shortcut.
(Sorry for multiple posts; I couldn't figure out how to edit the previous one.
Code: Select all
IDM_BLOCK_COMMENT Block Comment or Uncomment
IDM_BOX_COMMENT Box Comment
But still not sure how to assign a keyboard shortcut to it *and* if it masks the default keyboard shortcut.
(Sorry for multiple posts; I couldn't figure out how to edit the previous one.
Re: Change keyboard shortcuts
Ctrl+q seems to be a built-in SciTE hotkey. It can surely be changed somewhere, but a context-sensitive hotkey in a general hotkey script (which you might run already) should be able to block it:
(or the AHK v1 equivalent with #If, if you like)
In my SciTE4AHK, NumpadSub still toggles block comments, though.
If you want to choose a different key (combo), you can add this section from SciTEGlobal.properties to your SciTEuser.properties file:
and change the line
to something you prefer, if you don't want to use KeypadMinus (aka NumpadSub in AHK) which currenty would toggle block comments. You can see the used syntax in the other shortcuts. You might have to google for some keynames as they might differ from the AHK nomenclature, like Keypadminus showed. If you like, change other shortcuts as well.
I found these "user definitions" in SciTEGlobal.properties and I highly doubt that I put them there (probably it was the SciTE4AHK maintainer). Saving the changed SciTEuser.properties file will overwrite the settings in the global properties file (so don't edit that file) - after a restart of SciTE4AHK.
Code: Select all
#Requires AutoHotkey v2.0
#HotIf WinActive("ahk_class SciTEWindow")
^q::return ; block Ctrl and q
#HotIf
In my SciTE4AHK, NumpadSub still toggles block comments, though.
If you want to choose a different key (combo), you can add this section from SciTEGlobal.properties to your SciTEuser.properties file:
Code: Select all
# User defined key commands
user.shortcuts=\
Ctrl+Shift+V|IDM_PASTEANDDOWN|\
Ctrl+PageUp|IDM_PREVFILE|\
Ctrl+PageDown|IDM_NEXTFILE|\
KeypadPlus|IDM_EXPAND|\
KeypadMinus|IDM_BLOCK_COMMENT|\
Ctrl+F1|IDM_HELP_SCITE|
Code: Select all
KeypadMinus|IDM_BLOCK_COMMENT|\
I found these "user definitions" in SciTEGlobal.properties and I highly doubt that I put them there (probably it was the SciTE4AHK maintainer). Saving the changed SciTEuser.properties file will overwrite the settings in the global properties file (so don't edit that file) - after a restart of SciTE4AHK.
Re: Change keyboard shortcuts
Sorry for the late reply to this; it's been a difficult few weeks.
I tried it out, and it works perfectly! Thanks for the help.
Apropos of nothing, I also was able to find out how to add Alt+Up/Alt+Down to move selected lines up and down. I had to share because I was so excited haha.
Apparently this does it:
Alt+Up|2620|\
Alt+Down|2621|
I tried it out, and it works perfectly! Thanks for the help.
Apropos of nothing, I also was able to find out how to add Alt+Up/Alt+Down to move selected lines up and down. I had to share because I was so excited haha.
Apparently this does it:
Alt+Up|2620|\
Alt+Down|2621|
Who is online
Users browsing this forum: No registered users and 18 guests