![]() |
THotKey - rechte Maustaste als Hotkey setzen
Entweder bin ich blind oder blöd, aber wie kann man bitte die rechte Maustaste als Hotkey in einer THotKey-Komponente setzen? Wenn der User die rechte Maustaste drückt, soll was passieren. In der Auswahl gibt es keine Möglichkeit dazu. :?
|
Re: THotKey - rechte Maustaste als Hotkey setzen
Bist du dir sicher, dass vom System die rechte Maustaste generell als Hotkey vorgesehen ist?
|
Re: THotKey - rechte Maustaste als Hotkey setzen
Ich hab keine Ahnung. :mrgreen:
Wäre wünschenswert wenn ich die Maustaste(n) trotzdem als Hotkey benutzen könnte. :-( |
Re: THotKey - rechte Maustaste als Hotkey setzen
Zitat:
Zitat:
(Edit: Außer du findest noch die rechte Maustaste als Hotkey) |
Re: THotKey - rechte Maustaste als Hotkey setzen
RegisterHotKey erwartet doch einen virtuellen Keycode oder? Da könnte man ja VK_RBUTTON übergeben. Hab ich allerdings noch nie versucht, da mich ein solcher Hotkey vermutlich ziemlich nerven würde :lol:
|
Re: THotKey - rechte Maustaste als Hotkey setzen
Hi Deddy, leider klappt das nicht mit der Maustaste.
Delphi-Quellcode:
Ich nehme das ich um einen Mouse-Hook nicht drumrum kommen werde, oder? :-(
if cbrightmousebtn.Checked = true then ShortCutToHotKey(VK_RBUTTON, Key, Modifiers) else ShortCutToHotKey(HotKey2.HotKey, Key, Modifiers);
if cbrightmousebtn.Checked = true then Hotkey_id2 := GlobalAddAtom('VK_RBUTTON') else Hotkey_id2 := GlobalAddAtom('MyHotKey_2'); RegisterHotKey(Handle, Hotkey_id2, Modifiers, Key); procedure ShortCutToHotKey(HotKey: TShortCut; var Key : Word; var Modifiers: Uint); var Shift: TShiftState; begin ShortCutToKey(HotKey, Key, Shift); Modifiers := 0; if (ssShift in Shift) then Modifiers := Modifiers or MOD_SHIFT; if (ssAlt in Shift) then Modifiers := Modifiers or MOD_ALT; if (ssCtrl in Shift) then Modifiers := Modifiers or MOD_CONTROL; end; |
Re: THotKey - rechte Maustaste als Hotkey setzen
Wenn das so nicht klappt, fällt mir spontan auch keine andere Möglichkeit ein. :(
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 02:11 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz