Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #12512

Re: Hotkey Button

From "Jamal" <nospam@example.com>
Newsgroups comp.lang.clipper.visual-objects
Subject Re: Hotkey Button
Date 2019-06-09 03:46 -0400
Organization Aioe.org NNTP Server
Message-ID <qdidh2$1dha$1@gioia.aioe.org> (permalink)
References <f90474eb-9600-4e16-9c91-48d104b88a3a@googlegroups.com> <cb76027a-d091-4c76-9261-8e844524aa11@googlegroups.com>

Show all headers | View raw


As I said in my previous message, you can also use the dispatch() option and 
handle the Alt key and any key pressed.

Here is a working example:

METHOD Dispatch ( oEvent ) CLASS  HotKeyDialog

   LOCAL lAltOn as logic


   lAltOn := LOGIC(_cast, _and(GetKeyState(VK_MENU), SHORT(_cast, 0x8000)))


   IF oEvent:message ==  WM_SYSKEYUP .and. lAltOn

     if CHR(oEvent:wparam) == "P"

              ? "Alt + P Pressed"
               // call your method
              RETURN 1L
     endif

     if CHR(oEvent:wparam) == "S"
              ? "Alt + S Pressed"
              RETURN 1L
     endif
   ENDIF


   RETURN SUPER:Dispatch ( oEvent )


Jamal

"Frank M"  wrote in message 
news:cb76027a-d091-4c76-9261-8e844524aa11@googlegroups.com...

Am Donnerstag, 6. Juni 2019 10:15:23 UTC+2 schrieb Frank M:
> Hello,
> i have noticed that when have a Button with Hotkey (in this sample ALT+P)
>
> HyperLabel{#PushButton1,_chr(38)+"Push",NULL_STRING,NULL_STRING}
>
> i have only to add Cation from Button '&Push'
>
> That work when click ALT+P
>
> But that work with only Clicking P , too ?
>
> I this a normal behavior? I want that only the Hotkey work with ALT+Key, 
> not that only click Key (P) without ALT work.
>
> VO2.8 2838
>
> Regards, Frank


Hi Jamal,
thank you for testing.

It is a lot of work to provide all windows with a menu. Does everyone have 
the same behavior that is performed on the single key function? There must 
be a solution for it :-( 

Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Hotkey Button Frank M <frank_muessner@gmx.de> - 2019-06-06 01:15 -0700
  Re: Hotkey Button "Jamal" <nospam@example.com> - 2019-06-07 17:00 -0400
    Re: Hotkey Button "Jamal" <nospam@example.com> - 2019-06-07 17:13 -0400
  Re: Hotkey Button Frank M <frank_muessner@gmx.de> - 2019-06-08 08:25 -0700
    Re: Hotkey Button "Jamal" <nospam@example.com> - 2019-06-09 03:46 -0400
      Re: Hotkey Button Franz Rachbauer <office@rachbauer.org> - 2019-06-11 14:01 +0200
        Re: Hotkey Button "Jamal" <noooospam@example.com> - 2019-06-11 17:08 -0400
        Re: Hotkey Button "Jamal" <noooospam@example.com> - 2019-06-11 22:16 -0400
  Re: Hotkey Button Frank M <frank_muessner@gmx.de> - 2019-06-11 00:29 -0700

csiph-web