Try using:

if (Key = Ord('S')) and (Shift in [ssCTRL, ssShift]) then...

instead of

if (Key = Ord('S')) and (Shift = [ssCTRL, ssShift]) then...

Jerry Sands

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Alan Colburn
Sent: Tuesday, August 12, 2008 10:30 AM
To: [email protected]
Subject: Capturing Key Strokes & TShortCutList

I'm trying to assign an action to a keystroke combo (Ctrl-Shift-S) when a
particular Memo has the focus. I am using the control's KeyUp event with the
code:
 
if (Key = Ord('S')) and (Shift = [ssCTRL, ssShift]) then...
 
It works only sporadically. 
 
I'm wondering if anyone has a better solution. One of the alternates that
I've considered is simply creating an ActionManager item, to which one can
assign a shortcut. Ctrl-Shift-S is not one of the built in choices. I'd have
to use a secondary shortcut, of type TShortCutList (which is, apparently, a
string list descendant). I don't know how I would add TShortCutList
representation of Ctrl-Shift-S. 
 
As always, thanks for your thoughts -- Al C.
_________________________________________________________________
Your PC, mobile phone, and online services work together like never before.
http://clk.atdmt.com/MRT/go/108587394/direct/01/
_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

_______________________________________________
Delphi mailing list -> [email protected]
http://lists.elists.org/cgi-bin/mailman/listinfo/delphi

Reply via email to