Página 1 de 2
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 11:09 am
por Mahanimann
Hi,
Sorry for making this message so big, I still hope some of you gurus will
take some time to read it

I started using Xailer last week (Clipper and some Xbase++ background) and
are about to make a new app based on a big DOS Clipper app (a complete
rewrite) and would very much have thoughts, pointers, ideas concerning this:
I will have 2 main type windows (in the end about 30-40 of them):
1) An edit window (with TDBMaskEdit, TDBComboBox, and also some with
TDBBrowse)
2) A browse window where it is allowed to edit some fields/columns.
They will both have a TDBNavigator (modified to suit the two main window
types needs) and a TStatusBar .
I have made a function (pd_OpenWindow()) which I was thinking could open all
the 1) and 2) windows. There I can among other things do f.ex:
* Attach the "keyhandler" for hotkeys preset in (the modified) TDBNavigator
* Attach a "keyhandler" for app global keystrokes (f.ex. F12=Calculator)
* Enable/disable/show/hide certain TDBNavigator buttons subsequent to window
type ( 1) or 2) )
* Watch if a window is allready open, if it is, give it focus instead of
open a new instance
* Attach code to change the background color on edit-controls to reflect if
that they are in EDIT- or VIEW-mode
* Create the standard TStatusBar
My goal is to make the use of the app as speedy as possible, among other
things make the need for a mouse as unnecessary as possible. I will have a
set of hotkeys which will do the same everywhere in the app:
F1 = Help F2=Enter EDIT-mode, F3=New, F4=Delete, ESC=Cancel edit-mode,
PGDN=Save-exit edit mode, F9=Call browse-window etc.
For that I need a generic way to trap keystrokes and send keys through at
least 3 "keyhandlers" (i.e. trap for hotkeys set in TDBNavigator, window
specific hotkeys and app-global hotkeys) . What is the best way to approach
this in a generic way? (I also need to know if a hotkey is used in EDIT- or
VIEW-mode)
Any feedback will be very, very much appreciated.
Paal
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 2:35 pm
por ignacio
Paal,
> * Attach the "keyhandler" for hotkeys preset in (the modified)
> TDBNavigator
All the key strokes are handled by events. First the event is triggered on
the control that has been produced, if the event is not processed the event
is passed to its object conteiner and so on, up to its TForm container. To
trap a key stroke event you may use the events OnKeyDown or OnKeyChar.
Please review the docs abouth them.
> * Attach a "keyhandler" for app global keystrokes (f.ex. F12=Calculator)
See the function SetKey().
> * Enable/disable/show/hide certain TDBNavigator buttons subsequent to
> window type ( 1) or 2) )
Use the property lVisible of almost any control to make it visible or
invisible.
> * Watch if a window is allready open, if it is, give it focus instead of
> open a new instance
Make a new DATA member on your main form, for example:
DATA oMyChildWindow
When you create an run that window, just assign its value to this new data.
When ever you need to show that windows just do something like this:
IF ::oMyChildWindow != NIL
::oMyChildWindow := TMyChildWindow():New( Self )
.......
.......
::oMyChildWindow:OnClose := {|| ::oMyChildWindow := NIL }
ELSE
::oMyChildWindow:SetFocus()
ENDIF
> * Attach code to change the background color on edit-controls to reflect
> if that they are in EDIT- or VIEW-mode
You have two properties for that: TEdit:nClrPaneFocus and
TEdit:nClrTextFocus
If you want to make the modification for any instanced TEdit objectYou just
need to overload the TEdit class, for example:
CLASS TEdit FROM XEdit
PROPERTY :nClrPaneFocus := clRED
END CLASS
Put this code on any PRG module of your application.
> * Create the standard TStatusBar
Use the control TStatusBar on the Win32 tab.
> F1 = Help F2=Enter EDIT-mode, F3=New, F4=Delete, ESC=Cancel edit-mode,
> PGDN=Save-exit edit mode, F9=Call browse-window etc.
Already answered
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 2:35 pm
por NoName
Paal,
> * Attach the "keyhandler" for hotkeys preset in (the modified)
> TDBNavigator
All the key strokes are handled by events. First the event is triggered on
the control that has been produced, if the event is not processed the event
is passed to its object conteiner and so on, up to its TForm container. To
trap a key stroke event you may use the events OnKeyDown or OnKeyChar.
Please review the docs abouth them.
> * Attach a "keyhandler" for app global keystrokes (f.ex. F12=Calculator)
See the function SetKey().
> * Enable/disable/show/hide certain TDBNavigator buttons subsequent to
> window type ( 1) or 2) )
Use the property lVisible of almost any control to make it visible or
invisible.
> * Watch if a window is allready open, if it is, give it focus instead of
> open a new instance
Make a new DATA member on your main form, for example:
DATA oMyChildWindow
When you create an run that window, just assign its value to this new data.
When ever you need to show that windows just do something like this:
IF ::oMyChildWindow != NIL
::oMyChildWindow := TMyChildWindow():New( Self )
.......
.......
::oMyChildWindow:OnClose := {|| ::oMyChildWindow := NIL }
ELSE
::oMyChildWindow:SetFocus()
ENDIF
> * Attach code to change the background color on edit-controls to reflect
> if that they are in EDIT- or VIEW-mode
You have two properties for that: TEdit:nClrPaneFocus and
TEdit:nClrTextFocus
If you want to make the modification for any instanced TEdit objectYou just
need to overload the TEdit class, for example:
CLASS TEdit FROM XEdit
PROPERTY :nClrPaneFocus := clRED
END CLASS
Put this code on any PRG module of your application.
> * Create the standard TStatusBar
Use the control TStatusBar on the Win32 tab.
> F1 = Help F2=Enter EDIT-mode, F3=New, F4=Delete, ESC=Cancel edit-mode,
> PGDN=Save-exit edit mode, F9=Call browse-window etc.
Already answered
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 4:57 pm
por Mahanimann
Ignacio,
Thanks a lot for the answers. I have no comments, I have to "digest" the
info first.
Paal
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 4:57 pm
por Mahanimann
Ignacio,
Thanks a lot for the answers. I have no comments, I have to "digest" the
info first.
Paal
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 11:08 pm
por Mahanimann
> All the key strokes are handled by events. First the event is triggered on
> the control that has been produced, if the event is not processed the
> event is passed to its object conteiner and so on, up to its TForm
> container. To trap a key stroke event you may use the events OnKeyDown or
> OnKeyChar. Please review the docs abouth them.
To trap f.ex. K_PGDN (non-character type keys) in all types of edit controls
..AND. be able to distinguish between VIEW and EDIT-mode, is there another
way? Or did you mean to generically in pd_OpenWindow() to put code into
every oGET:OnKeyDown in the form? (Like I do with the oGet:nClrPane, as
explained below)
>> * Watch if a window is allready open, if it is, give it focus instead of
>> open a new instance
I scan Application:aForms for :cClassName and :cText and then do a
Application:aForms[n]:SetFocus() if it's there. (But, I can't find a way to
determine the state of the window: Maximized, Minimized or Normal. (which
is necessary to know if the window is minimized) How do I determine that?)
>> * Attach code to change the background color on edit-controls to reflect
>> if that they are in EDIT- or VIEW-mode
>
> You have two properties for that: TEdit:nClrPaneFocus and
> TEdit:nClrTextFocus
I want the background color (:nClrPane) to be clBtnFace on all GET's until
the TDBNavigator EDIT-button is pushed. Then it's clear for everyone that
the GET's are in VIEW mode. When the EDIT-button is pushed, the window
enters EDIT-mode and all the GET's background colors (:nClrPane) changes to
clWindow.
To manange this I have put the necessary code into new METHOD SetClrPane(
lEditMode ) CLASS TDBNavigator which is called from both the METHOD's Lock()
and UnLock() CLASS TDBNavigator.
This works fine, but maybe there is a better approach?
Thanks for your time,
Paal
Best way to catch keystrokes?
Publicado: Lun Oct 08, 2007 11:08 pm
por Mahanimann
> All the key strokes are handled by events. First the event is triggered on
> the control that has been produced, if the event is not processed the
> event is passed to its object conteiner and so on, up to its TForm
> container. To trap a key stroke event you may use the events OnKeyDown or
> OnKeyChar. Please review the docs abouth them.
To trap f.ex. K_PGDN (non-character type keys) in all types of edit controls
..AND. be able to distinguish between VIEW and EDIT-mode, is there another
way? Or did you mean to generically in pd_OpenWindow() to put code into
every oGET:OnKeyDown in the form? (Like I do with the oGet:nClrPane, as
explained below)
>> * Watch if a window is allready open, if it is, give it focus instead of
>> open a new instance
I scan Application:aForms for :cClassName and :cText and then do a
Application:aForms[n]:SetFocus() if it's there. (But, I can't find a way to
determine the state of the window: Maximized, Minimized or Normal. (which
is necessary to know if the window is minimized) How do I determine that?)
>> * Attach code to change the background color on edit-controls to reflect
>> if that they are in EDIT- or VIEW-mode
>
> You have two properties for that: TEdit:nClrPaneFocus and
> TEdit:nClrTextFocus
I want the background color (:nClrPane) to be clBtnFace on all GET's until
the TDBNavigator EDIT-button is pushed. Then it's clear for everyone that
the GET's are in VIEW mode. When the EDIT-button is pushed, the window
enters EDIT-mode and all the GET's background colors (:nClrPane) changes to
clWindow.
To manange this I have put the necessary code into new METHOD SetClrPane(
lEditMode ) CLASS TDBNavigator which is called from both the METHOD's Lock()
and UnLock() CLASS TDBNavigator.
This works fine, but maybe there is a better approach?
Thanks for your time,
Paal
Best way to catch keystrokes?
Publicado: Mar Oct 09, 2007 10:36 am
por ignacio
Paal,
> To trap f.ex. K_PGDN (non-character type keys) in all types of edit
> controls .AND. be able to distinguish between VIEW and EDIT-mode, is there
> another way? Or did you mean to generically in pd_OpenWindow() to put
> code into every oGET:OnKeyDown in the form? (Like I do with the
> oGet:nClrPane, as explained below)
If you want to make a change to any object instance of a specific class,
,just overload its "T" class. That's all.
Just try this in your code:
CLASS TEdit FROM XEdit
METHOD WMKeyDown( nKey, nFlags )
END CLASS
METHOD WMKeyDown( nKey, nFlags )
LogDebug( "Key stroke", nKey )
RETURN Super:WMKeyDown( nKey, nFlags )
> I scan Application:aForms for :cClassName and :cText and then do a
> Application:aForms[n]:SetFocus() if it's there. (But, I can't find a way
> to determine the state of the window: Maximized, Minimized or Normal.
> (which is necessary to know if the window is minimized) How do I
> determine that?)
You have two functions for that:
- ISZOOMED( hWnd )
- ISICONIC( hWnd )
> I want the background color (:nClrPane) to be clBtnFace on all GET's until
> the TDBNavigator EDIT-button is pushed. Then it's clear for everyone that
> the GET's are in VIEW mode. When the EDIT-button is pushed, the window
> enters EDIT-mode and all the GET's background colors (:nClrPane) changes
> to clWindow.
Use the same approach given on first question. But your approach is also
valid.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
Best way to catch keystrokes?
Publicado: Mar Oct 09, 2007 10:36 am
por NoName
Paal,
> To trap f.ex. K_PGDN (non-character type keys) in all types of edit
> controls .AND. be able to distinguish between VIEW and EDIT-mode, is there
> another way? Or did you mean to generically in pd_OpenWindow() to put
> code into every oGET:OnKeyDown in the form? (Like I do with the
> oGet:nClrPane, as explained below)
If you want to make a change to any object instance of a specific class,
,just overload its "T" class. That's all.
Just try this in your code:
CLASS TEdit FROM XEdit
METHOD WMKeyDown( nKey, nFlags )
END CLASS
METHOD WMKeyDown( nKey, nFlags )
LogDebug( "Key stroke", nKey )
RETURN Super:WMKeyDown( nKey, nFlags )
> I scan Application:aForms for :cClassName and :cText and then do a
> Application:aForms[n]:SetFocus() if it's there. (But, I can't find a way
> to determine the state of the window: Maximized, Minimized or Normal.
> (which is necessary to know if the window is minimized) How do I
> determine that?)
You have two functions for that:
- ISZOOMED( hWnd )
- ISICONIC( hWnd )
> I want the background color (:nClrPane) to be clBtnFace on all GET's until
> the TDBNavigator EDIT-button is pushed. Then it's clear for everyone that
> the GET's are in VIEW mode. When the EDIT-button is pushed, the window
> enters EDIT-mode and all the GET's background colors (:nClrPane) changes
> to clWindow.
Use the same approach given on first question. But your approach is also
valid.
Regards,
--
Ignacio Ortiz de Zúñiga
http://www.xailer.com
Best way to catch keystrokes?
Publicado: Mié Oct 10, 2007 2:03 am
por Mahanimann
> If you want to make a change to any object instance of a specific class,
> ,just overload its "T" class. That's all.
>
> Just try this in your code: .....
......
> You have two functions for that:
> - ISZOOMED( hWnd )
> - ISICONIC( hWnd )
.....
Thanks a lot.
We can conclude with that most of what I ask about is in fact documented
somewhere. I have obviously not studied the xHarbour and Xailer
documentation good enough. You should spend your time developing Xailer,
not spending it answering newbie questions

I will leave the IDE for a
while and read instead.
Again, thanks for your answers.
Regards,
Paal
Best way to catch keystrokes?
Publicado: Mié Oct 10, 2007 2:03 am
por Mahanimann
> If you want to make a change to any object instance of a specific class,
> ,just overload its "T" class. That's all.
>
> Just try this in your code: .....
......
> You have two functions for that:
> - ISZOOMED( hWnd )
> - ISICONIC( hWnd )
.....
Thanks a lot.
We can conclude with that most of what I ask about is in fact documented
somewhere. I have obviously not studied the xHarbour and Xailer
documentation good enough. You should spend your time developing Xailer,
not spending it answering newbie questions

I will leave the IDE for a
while and read instead.
Again, thanks for your answers.
Regards,
Paal
Best way to catch keystrokes?
Publicado: Mié Oct 10, 2007 11:08 pm
por Mahanimann
> Just try this in your code:
> CLASS TEdit FROM XEdit
> METHOD WMKeyDown( nKey, nFlags )
> END CLASS
>
> METHOD WMKeyDown( nKey, nFlags )
> LogDebug( "Key stroke", nKey )
> RETURN Super:WMKeyDown( nKey, nFlags )
It seems I have to bother you once again. The nKey value received in METHOD
WMKeyDown(), what kind of value is that? It's not according to INKEY.CH,
and I can't find anything about it anywhere. LastKey(), Inkey() and
NextKey() makes no sense at all (gives back 0 or 13).
Likewise with the function VKeyToAscii() I can't find anything about it
anywhere. Belive me, I have tried hard. Other functions as well, but I
have not digged that deep to find out about them. Are there any place where
I can get a summary of all functions and methods available in Xailer and/or
xHarbour?
Thanks,
Paal
Best way to catch keystrokes?
Publicado: Mié Oct 10, 2007 11:08 pm
por Mahanimann
> Just try this in your code:
> CLASS TEdit FROM XEdit
> METHOD WMKeyDown( nKey, nFlags )
> END CLASS
>
> METHOD WMKeyDown( nKey, nFlags )
> LogDebug( "Key stroke", nKey )
> RETURN Super:WMKeyDown( nKey, nFlags )
It seems I have to bother you once again. The nKey value received in METHOD
WMKeyDown(), what kind of value is that? It's not according to INKEY.CH,
and I can't find anything about it anywhere. LastKey(), Inkey() and
NextKey() makes no sense at all (gives back 0 or 13).
Likewise with the function VKeyToAscii() I can't find anything about it
anywhere. Belive me, I have tried hard. Other functions as well, but I
have not digged that deep to find out about them. Are there any place where
I can get a summary of all functions and methods available in Xailer and/or
xHarbour?
Thanks,
Paal
Best way to catch keystrokes?
Publicado: Jue Oct 11, 2007 11:12 pm
por notengo
Mahanimann,
just include WinUser.api in your source and use its VK_ constants, ie.
CASE nKey == VK_F2
...
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Jue Oct 11, 2007 11:12 pm
por notengo
Mahanimann,
just include WinUser.api in your source and use its VK_ constants, ie.
CASE nKey == VK_F2
...
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 2:11 am
por Mahanimann
> just include WinUser.api in your source and use its VK_ constants, ie.
>
> CASE nKey == VK_F2
Thank you very much for that *very* important and vital information

.
This VK_ stuff (i.e. nKey in WMKeyDown(nKey, nFlags) ) reports about which
button-number on the keyboard that is pressed. But where or how do I catch
if a CTRL, ALT, SHIFT etc-button also is pressed?
To ask in another way: what would you use, and how would you translate this
into the VK_-stuff:
do case
case nKey == K_CTRL_ENTER
case nKey == K_ALT_W
case nKey == K_SHIFT_F12
case nKey == asc("@") // on my keyboard this is ALT-GR + 2 (the #2 button
above Q and W)
endcase
Thank you for replying, i really appreciate it.
Paal
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 2:11 am
por Mahanimann
> just include WinUser.api in your source and use its VK_ constants, ie.
>
> CASE nKey == VK_F2
Thank you very much for that *very* important and vital information

.
This VK_ stuff (i.e. nKey in WMKeyDown(nKey, nFlags) ) reports about which
button-number on the keyboard that is pressed. But where or how do I catch
if a CTRL, ALT, SHIFT etc-button also is pressed?
To ask in another way: what would you use, and how would you translate this
into the VK_-stuff:
do case
case nKey == K_CTRL_ENTER
case nKey == K_ALT_W
case nKey == K_SHIFT_F12
case nKey == asc("@") // on my keyboard this is ALT-GR + 2 (the #2 button
above Q and W)
endcase
Thank you for replying, i really appreciate it.
Paal
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 12:39 pm
por notengo
Mahanimann,
> To ask in another way: what would you use, and how would you translate this
> into the VK_-stuff:
This is how you should do it (I wrote it in a hurry and could be buggy but
you'll get the point):
do case
case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
...
case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
...
case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
...
case nKey == Asc( "@" )
endcase
> Thank you for replying, i really appreciate it.
Feel free to ask whatever you need. We are here to help our users as much
as we can.
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 12:39 pm
por notengo
Mahanimann,
> To ask in another way: what would you use, and how would you translate this
> into the VK_-stuff:
This is how you should do it (I wrote it in a hurry and could be buggy but
you'll get the point):
do case
case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
...
case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
...
case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
...
case nKey == Asc( "@" )
endcase
> Thank you for replying, i really appreciate it.
Feel free to ask whatever you need. We are here to help our users as much
as we can.
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 2:11 pm
por Mahanimann
> do case
> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
> case nKey == Asc( "@" )
> endcase
Ahaa, thanks a lot!
To avoid questions about this, at least from old Clipper-heads, I suggest
you put something about this in the Xailer help file. I have searched all
your newsgroups and there aren't many questions about it, but then you don't
know how many demo-testers who have scratched their heads in
incomprehension.
Thanks,
Paal
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 2:11 pm
por Mahanimann
> do case
> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
> case nKey == Asc( "@" )
> endcase
Ahaa, thanks a lot!
To avoid questions about this, at least from old Clipper-heads, I suggest
you put something about this in the Xailer help file. I have searched all
your newsgroups and there aren't many questions about it, but then you don't
know how many demo-testers who have scratched their heads in
incomprehension.
Thanks,
Paal
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 5:19 pm
por notengo
Mahanimann,
>> do case
>> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
>> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
>> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
>> case nKey == Asc( "@" )
>> endcase
>
> Ahaa, thanks a lot!
I forgot to say that it is possible to make the code a little cleaner:
IF LGetKeyState( VK_CONTROL )
// Handle CTRL + key strokes
DO CASE
CASE nKey == VK_F2
...
CASE nKey == VK_F3
ELSEIF LGetKeyState( VK_SHIFT )
// Handle SHIFT + key strokes
DO CASE
CASE nKey == VK_F2
...
CASE nKey == VK_F3
ENDIF
> To avoid questions about this, at least from old Clipper-heads, I suggest
> you put something about this in the Xailer help file. I have searched all
> your newsgroups and there aren't many questions about it, but then you don't
> know how many demo-testers who have scratched their heads in
> incomprehension.
This is used on many of the samples included in Xailer. Anyhow I'm thinking
on adding some grep alike tool so anybody can search in all xailer's code
base to solve doubts.
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 5:19 pm
por notengo
Mahanimann,
>> do case
>> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
>> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
>> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
>> case nKey == Asc( "@" )
>> endcase
>
> Ahaa, thanks a lot!
I forgot to say that it is possible to make the code a little cleaner:
IF LGetKeyState( VK_CONTROL )
// Handle CTRL + key strokes
DO CASE
CASE nKey == VK_F2
...
CASE nKey == VK_F3
ELSEIF LGetKeyState( VK_SHIFT )
// Handle SHIFT + key strokes
DO CASE
CASE nKey == VK_F2
...
CASE nKey == VK_F3
ENDIF
> To avoid questions about this, at least from old Clipper-heads, I suggest
> you put something about this in the Xailer help file. I have searched all
> your newsgroups and there aren't many questions about it, but then you don't
> know how many demo-testers who have scratched their heads in
> incomprehension.
This is used on many of the samples included in Xailer. Anyhow I'm thinking
on adding some grep alike tool so anybody can search in all xailer's code
base to solve doubts.
Regards,
José Lalín
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 5:54 pm
por Mahanimann
> do case
> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
> case nKey == Asc( "@" )
> endcase
Hopefully the last question about this: HB_KeyPut() and KEYBOARD does not
work either. What is the Xailer equivalent for f.ex. this:
HB_KeyPut( K_SH_TAB )
KEYBOARD "Xailer rocks!"
KEYBOARD "Xailer rocks!" + K_CTRL_F2
Thanks,
Paal
Best way to catch keystrokes?
Publicado: Vie Oct 12, 2007 5:54 pm
por Mahanimann
> do case
> case nKey == VK_RETURN .AND. LGetKeyState( VK_CONTROL )
> case nKey == Asc( "W" ) .AND. LGetKeyState( VK_MENU )
> case nKey == VK_F12 .AND. LGetGeyState( VK_SHIFT )
> case nKey == Asc( "@" )
> endcase
Hopefully the last question about this: HB_KeyPut() and KEYBOARD does not
work either. What is the Xailer equivalent for f.ex. this:
HB_KeyPut( K_SH_TAB )
KEYBOARD "Xailer rocks!"
KEYBOARD "Xailer rocks!" + K_CTRL_F2
Thanks,
Paal