![]() |
Überprüfen ob STRG gedrückt ist
Hallo,
wie kann man überprüfen ob die Taste STRG (bzw. ALT) gedrückt ist? Ich möchte keinen Hook haben, der mir immer Bescheid gibt, wenn die Taste gedrückt wird, sondern ich möchte zu einem bestimmten Zeitpunkt überprüfen, ob diese Tasten im Moment runtergedrückt ist. Wie kann ich das machen? (wusste auch nicht wonach ich in der Suche suchen sollte.) Vielen Dank im voraus |
Re: Überprüfen ob STRG gedrückt ist
Delphi-Quellcode:
(by SDC)
function CtrlDown: Boolean;
var State: TKeyboardState; begin GetKeyboardState(State); Result := ((State[VK_CONTROL] and 128) <> 0); end; function ShiftDown: Boolean; var State: TKeyboardState; begin GetKeyboardState(State); Result := ((State[VK_SHIFT] and 128) <> 0); end; function AltDown: Boolean; var State: TKeyboardState; begin GetKeyboardState(State); Result := ((State[VK_MENU] and 128) <> 0); end; |
Re: Überprüfen ob STRG gedrückt ist
Vielen Dank. Genau danach hatte ich gesucht.
Wer ist SDC bzw. was ist deine Quelle? (falls ich sowas nochmal suche) |
Re: Überprüfen ob STRG gedrückt ist
Zitat:
![]() |
Alle Zeitangaben in WEZ +1. Es ist jetzt 00:00 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