Modifier combo like "ctrl-alt" should not activate altsnap if "alt" is the activation key
dsjstc opened this issue · 4 comments
Functionality change request:
If my alternate action key is Alt, then holding a modifier combination like should not be recognized as altsnap's activation modifier. In vscode, for example, shift+alt+drag means column select, and I'd prefer not to have to blacklist vscode (or change my altsnap key!) to retain that functionality.
In my understanding, modifier combos are distinct, not additive -- eg, ctrl-delete should not be activated when hitting ctrl-alt-delete. In the case of altsnap, I don't immediately see any use cases where one would want altsnap's alternate action activated by all five modifier combos that happen to include alt.
All those keys have specific meanings for AltSnap do they cannot be hard-disabled or the program would loose a lot of functionality instantly.
I do not perfectly understand what your setup is because it seems you only use alt to activate AltSnap and you still say that you use Alt as an Alternate action key?
In anyway you have two solutions:
- If you want to activate AltSnap with a single key you can set
MaxKeysNum=1
in the[Advanced]
section of the ini file.
MaxKeysNum=1
; Maximum number of keys that can be pressed on the keyboard
; at the same time beyond which AltSnap click will no longer activate.
; It will not interupt AltSnap if it is already in the middle of an action.
; Default is 0 (unlimited).
In this case you will have to press Alt first to use AltSnap and if you press Ctrl+Alt (with Ctrl first) then AltSnap will not activate, same for any other combination.
- The other option is to add Ctrl (
A2
)to theKillKey
list in the[Input]
section of the ini file:
Killkeys=09 2E A2
; Keys that will disable AltSnap when pressed down!
; Space-separated hexadecimal values.
; All keys from A-Z always disable AltSnap, so do not add them here.
; Default is TAB: 09 (for DisplayFusion's Alt+Tab).
; 2E for the DEL key (for Ctrl+Alt+DEL).
In this case if you press Alt+Ctrl, then the Ctrl key will stop the action, If you press Ctrl+Alt though yu will still have AltSnap Activate.
You can combine both the above techniques if you altsnap to activate only when you press Alt alone.
Related: #324
Hey, thanks for the suggestions! Sorry for my slowness, much going on in my life right now and I didn't want to answer carelessly. I wasn't enough of a power user to know that I should be digging through the .ini file, thanks for the nudge!
-
I misunderstood what I was doing on the config page, I do not use any Alternate action.
-
KillKeys A2 does not have the desired effect, AltSnap is still active when the chord is held. As an aside, it would be lovely to know where to look up these key IDs, since they don't seem to be the standard windows keycodes.
-
MaxKeysNum=1 works perfectly for my use case, thanks very much! I still think this behaviour is going to be unexpected for most users, but I'm super appreciative to have a configuration that works for me.
KillKeys A2 does not have the desired effect, AltSnap is still active when the chord is held. As an aside, it would be lovely to know where to look up these key IDs, since they don't seem to be the standard windows keycodes.
The codes are the standard virtual key codes, you can find here: https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
However you cannot use some special scancodes like 10
11
or 12
that are Shift/Ctrl/Alt left or right, because they are translated at a higher level.