mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Added the possibility to use the Windows-key as a hotkey, this only works when defined in the ini!! It's currently not possible to define it in the settings GUI.
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1880 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
20f759baf3
commit
6fc15cddd3
1 changed files with 12 additions and 0 deletions
|
@ -377,6 +377,9 @@ namespace GreenshotPlugin.Controls {
|
|||
if ((modifierKeyCode & Keys.Shift) > 0) {
|
||||
hotkeyString.Append("Shift").Append(" + ");
|
||||
}
|
||||
if (modifierKeyCode == Keys.LWin || modifierKeyCode == Keys.RWin) {
|
||||
hotkeyString.Append("Win").Append(" + ");
|
||||
}
|
||||
return hotkeyString.ToString();
|
||||
}
|
||||
|
||||
|
@ -396,6 +399,9 @@ namespace GreenshotPlugin.Controls {
|
|||
if ((modifierKeyCode & Keys.Shift) > 0) {
|
||||
hotkeyString.Append(GetKeyName(Keys.Shift)).Append(" + ");
|
||||
}
|
||||
if (modifierKeyCode == Keys.LWin || modifierKeyCode == Keys.RWin) {
|
||||
hotkeyString.Append("Win").Append(" + ");
|
||||
}
|
||||
return hotkeyString.ToString();
|
||||
}
|
||||
|
||||
|
@ -412,6 +418,9 @@ namespace GreenshotPlugin.Controls {
|
|||
if (modifiersString.ToLower().Contains("shift")) {
|
||||
modifiers |= Keys.Shift;
|
||||
}
|
||||
if (modifiersString.ToLower().Contains("win")) {
|
||||
modifiers |= Keys.LWin;
|
||||
}
|
||||
}
|
||||
return modifiers;
|
||||
}
|
||||
|
@ -459,6 +468,9 @@ namespace GreenshotPlugin.Controls {
|
|||
if ((modifierKeyCode & Keys.Shift) > 0) {
|
||||
modifiers |= (uint)Modifiers.SHIFT;
|
||||
}
|
||||
if (modifierKeyCode == Keys.LWin || modifierKeyCode == Keys.RWin) {
|
||||
modifiers |= (uint)Modifiers.WIN;
|
||||
}
|
||||
|
||||
if (RegisterHotKey(hotkeyHWND, hotKeyCounter, modifiers, (uint)virtualKeyCode)) {
|
||||
keyHandlers.Add(hotKeyCounter, handler);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue