[GH-ISSUE #937] [Bug] Can't set Ctrl+Alt+-/= as shortcuts #723

Closed
opened 2026-02-26 09:32:25 +03:00 by kerem · 8 comments
Owner

Originally created by @wenfangdu on GitHub (Jul 11, 2021).
Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/937

Originally assigned to: @pawlos on GitHub.

I was trying to set Ctrl+Alt+- for Discard and Ctrl+Alt+= for Stop, but couldn't set them successfully.

For what it's worth, Ctrl+Alt+0 can be set.

2021-07-16 07_33_33

Originally created by @wenfangdu on GitHub (Jul 11, 2021). Original GitHub issue: https://github.com/NickeManarin/ScreenToGif/issues/937 Originally assigned to: @pawlos on GitHub. I was trying to set `Ctrl`+`Alt`+`-` for `Discard` and `Ctrl`+`Alt`+`=` for `Stop`, but couldn't set them successfully. For what it's worth, `Ctrl`+`Alt`+`0` can be set. ![2021-07-16 07_33_33](https://user-images.githubusercontent.com/28700378/125870562-4202c38a-5a0b-4c7e-90dc-b81e24ac8665.gif)
Author
Owner

@pawlos commented on GitHub (Jul 20, 2021):

@NickeManarin I can see in the code that those are not allowed. Any particular reason for that? Changing the code to allow those seems to be working fine

image

<!-- gh-comment-id:883563784 --> @pawlos commented on GitHub (Jul 20, 2021): @NickeManarin I can see in the code that those are not allowed. Any particular reason for that? Changing the code to allow those seems to be working fine ![image](https://user-images.githubusercontent.com/1296768/126368267-8f9a1c31-4a69-4f0a-9fc6-9d412a1f7369.png)
Author
Owner

@pawlos commented on GitHub (Jul 21, 2021):

Not sure why I've posted with Shift 🤦‍♂️, but it works with Alt too.

<!-- gh-comment-id:883978643 --> @pawlos commented on GitHub (Jul 21, 2021): Not sure why I've posted with Shift 🤦‍♂️, but it works with Alt too.
Author
Owner

@NickeManarin commented on GitHub (Jul 21, 2021):

@pawlos The recorder uses a different method for the detection of key presses.
I don't remember exactly why I set to prevent users from setting some keys, but it had something to do with the key hook.

<!-- gh-comment-id:884545028 --> @NickeManarin commented on GitHub (Jul 21, 2021): @pawlos The recorder uses a different method for the detection of key presses. I don't remember exactly why I set to prevent users from setting some keys, but it had something to do with the key hook.
Author
Owner

@pawlos commented on GitHub (Jul 23, 2021):

@NickeManarin I guess it might be due to the fact that above the current cut (key code 114), there's some buttons that would make sense to exclude like shifts, alts or scrlock (so the allowed key combination could be alt + shift + shift :D). Since the cut was deliberate do you consider this as a bug & to be fixed? Or is it ok as designed to exclude some chars.

<!-- gh-comment-id:885764161 --> @pawlos commented on GitHub (Jul 23, 2021): @NickeManarin I guess it might be due to the fact that above the current cut (key code 114), there's some buttons that would make sense to exclude like shifts, alts or scrlock (so the allowed key combination could be alt + shift + shift :D). Since the cut was deliberate do you consider this as a bug & to be fixed? Or is it ok as designed to exclude some chars.
Author
Owner

@NickeManarin commented on GitHub (Jul 24, 2021):

@pawlos There are some keys which could be allowed but were cut by mistake.

    NumLock = 114, //Invalid
    Scroll = 115, //Invalid
    LeftShift = 116, //Invalid
    RightShift = 117, //Invalid
    LeftCtrl = 118, //Invalid
    RightCtrl = 119, //Invalid
    LeftAlt = 120, //Invalid
    RightAlt = 121, //Invalid
    BrowserBack = 122, //Invalid
    BrowserForward = 123, //Invalid
    BrowserRefresh = 124, //Invalid
    BrowserStop = 125, //Invalid
    BrowserSearch = 126, //Invalid
    BrowserFavorites = 127, //Invalid
    BrowserHome = 128, //Invalid
    VolumeMute = 129, //Invalid
    VolumeDown = 130, //Invalid
    VolumeUp = 131, //Invalid
    MediaNextTrack = 132, //Invalid
    MediaPreviousTrack = 133, //Invalid
    MediaStop = 134, //Invalid
    MediaPlayPause = 135, //Invalid
    LaunchMail = 136, //Invalid
    SelectMedia = 137, //Invalid
    LaunchApplication1 = 138, //Invalid
    LaunchApplication2 = 139, //Invalid
    Oem1 = 140, //?
    OemSemicolon = 140, //?
    OemPlus = 141, //Ok
    OemComma = 142, //Ok
    OemMinus = 143, //Ok
    OemPeriod = 144, //Ok
    Oem2 = 145, //?
    OemQuestion = 145, //Ok
    Oem3 = 146, //?
    OemTilde = 146, //Ok
    AbntC1 = 147, //Ok
    AbntC2 = 148, //Ok
    Oem4 = 149, //?
    OemOpenBrackets = 149, //Ok
    Oem5 = 150, //?
    OemPipe = 150, //Ok
    Oem6 = 151, //?
    OemCloseBrackets = 151, //Ok
    Oem7 = 152, //?
    OemQuotes = 152, //Ok
    Oem8 = 153, //?
    Oem102 = 154, //?
    OemBackslash = 154, //Ok
    ImeProcessed = 155, //Invalid
    System = 156, //Invalid
    DbeAlphanumeric = 157, //?
    OemAttn = 157, //?
    DbeKatakana = 158, //?
    OemFinish = 158, //?
    DbeHiragana = 159, //?
    OemCopy = 159, //?
    DbeSbcsChar = 160, //?
    OemAuto = 160, //?
    DbeDbcsChar = 161, //Invalid
    OemEnlw = 161, //?
    DbeRoman = 162, //Invalid
    OemBackTab = 162, //?
    Attn = 163, //?
    DbeNoRoman = 163, //Invalid
    CrSel = 164, //?
    DbeEnterWordRegisterMode = 164, //Invalid
    DbeEnterImeConfigureMode = 165, //Invalid
    ExSel = 165, //Invalid
    DbeFlushString = 166, //Invalid
    EraseEof = 166, //Invalid
    DbeCodeInput = 167, //Invalid
    Play = 167, //Invalid
    DbeNoCodeInput = 168, //Invalid
    Zoom = 168, //Invalid
    DbeDetermineString = 169, //Invalid
    NoName = 169, //Invalid
    DbeEnterDialogConversionMode = 170, //Invalid
    Pa1 = 170, //?
    OemClear = 171, //?
    DeadCharProcessed = 172, //Invalid
<!-- gh-comment-id:886109387 --> @NickeManarin commented on GitHub (Jul 24, 2021): @pawlos There are some keys which could be allowed but were cut by mistake. ```cs NumLock = 114, //Invalid Scroll = 115, //Invalid LeftShift = 116, //Invalid RightShift = 117, //Invalid LeftCtrl = 118, //Invalid RightCtrl = 119, //Invalid LeftAlt = 120, //Invalid RightAlt = 121, //Invalid BrowserBack = 122, //Invalid BrowserForward = 123, //Invalid BrowserRefresh = 124, //Invalid BrowserStop = 125, //Invalid BrowserSearch = 126, //Invalid BrowserFavorites = 127, //Invalid BrowserHome = 128, //Invalid VolumeMute = 129, //Invalid VolumeDown = 130, //Invalid VolumeUp = 131, //Invalid MediaNextTrack = 132, //Invalid MediaPreviousTrack = 133, //Invalid MediaStop = 134, //Invalid MediaPlayPause = 135, //Invalid LaunchMail = 136, //Invalid SelectMedia = 137, //Invalid LaunchApplication1 = 138, //Invalid LaunchApplication2 = 139, //Invalid Oem1 = 140, //? OemSemicolon = 140, //? OemPlus = 141, //Ok OemComma = 142, //Ok OemMinus = 143, //Ok OemPeriod = 144, //Ok Oem2 = 145, //? OemQuestion = 145, //Ok Oem3 = 146, //? OemTilde = 146, //Ok AbntC1 = 147, //Ok AbntC2 = 148, //Ok Oem4 = 149, //? OemOpenBrackets = 149, //Ok Oem5 = 150, //? OemPipe = 150, //Ok Oem6 = 151, //? OemCloseBrackets = 151, //Ok Oem7 = 152, //? OemQuotes = 152, //Ok Oem8 = 153, //? Oem102 = 154, //? OemBackslash = 154, //Ok ImeProcessed = 155, //Invalid System = 156, //Invalid DbeAlphanumeric = 157, //? OemAttn = 157, //? DbeKatakana = 158, //? OemFinish = 158, //? DbeHiragana = 159, //? OemCopy = 159, //? DbeSbcsChar = 160, //? OemAuto = 160, //? DbeDbcsChar = 161, //Invalid OemEnlw = 161, //? DbeRoman = 162, //Invalid OemBackTab = 162, //? Attn = 163, //? DbeNoRoman = 163, //Invalid CrSel = 164, //? DbeEnterWordRegisterMode = 164, //Invalid DbeEnterImeConfigureMode = 165, //Invalid ExSel = 165, //Invalid DbeFlushString = 166, //Invalid EraseEof = 166, //Invalid DbeCodeInput = 167, //Invalid Play = 167, //Invalid DbeNoCodeInput = 168, //Invalid Zoom = 168, //Invalid DbeDetermineString = 169, //Invalid NoName = 169, //Invalid DbeEnterDialogConversionMode = 170, //Invalid Pa1 = 170, //? OemClear = 171, //? DeadCharProcessed = 172, //Invalid ```
Author
Owner

@pawlos commented on GitHub (Jul 26, 2021):

I've decided to do a change and add those between 140 and 154. The ones from 157 marked as //? seems like a bit of controling characters than the actual ones.

<!-- gh-comment-id:886823326 --> @pawlos commented on GitHub (Jul 26, 2021): I've decided to do a change and add those between 140 and 154. The ones from 157 marked as //? seems like a bit of controling characters than the actual ones.
Author
Owner

@NickeManarin commented on GitHub (Aug 8, 2021):

Interesting, Ctrl + Shift + 0 (zero) may not work for most people.

https://github.com/Microsoft/vscode/issues/2585

<!-- gh-comment-id:894857631 --> @NickeManarin commented on GitHub (Aug 8, 2021): Interesting, Ctrl + Shift + 0 (zero) may not work for most people. https://github.com/Microsoft/vscode/issues/2585
Author
Owner

@pawlos commented on GitHub (Aug 9, 2021):

@NickeManarin thx for the link.

<!-- gh-comment-id:895388818 --> @pawlos commented on GitHub (Aug 9, 2021): @NickeManarin thx for the link.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ScreenToGif#723
No description provided.