mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added fix for repeating hotkeys, this only works with Windows 7 and later. Updated the readme.txt.template.
This commit is contained in:
parent
8c22a44b33
commit
5a594ba954
2 changed files with 15 additions and 13 deletions
|
@ -57,7 +57,8 @@ namespace GreenshotPlugin.Controls {
|
|||
ALT = 1,
|
||||
CTRL = 2,
|
||||
SHIFT = 4,
|
||||
WIN = 8
|
||||
WIN = 8,
|
||||
NO_REPEAT = 0x4000
|
||||
}
|
||||
|
||||
private enum MapType : uint {
|
||||
|
@ -472,7 +473,10 @@ namespace GreenshotPlugin.Controls {
|
|||
if (modifierKeyCode == Keys.LWin || modifierKeyCode == Keys.RWin) {
|
||||
modifiers |= (uint)Modifiers.WIN;
|
||||
}
|
||||
|
||||
// Disable repeating hotkey for Windows 7 and beyond, as described in #1559
|
||||
if (Environment.OSVersion.Version.Major >= 6 && Environment.OSVersion.Version.Minor >= 1) {
|
||||
modifiers |= (uint)Modifiers.NO_REPEAT;
|
||||
}
|
||||
if (RegisterHotKey(hotkeyHWND, hotKeyCounter, modifiers, (uint)virtualKeyCode)) {
|
||||
keyHandlers.Add(hotKeyCounter, handler);
|
||||
return hotKeyCounter++;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue