Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to navigate through toolbar buttons by using arrow keys?
#3
I have created a new macro containing this code:

int+ g_tbkb_aw=win
int tb=win("TOOLBAR19" "QM_Toolbar")
if(!tb) tb=mac("Toolbar19")
act id(9999 tb)

I have replaced Toolbar19 with the name of my virtual keyboard, that is a QM toolbar.
I have created a new function named tbkb_hook:

;/
function# hWnd message wParam lParam

int+ g_tbkb_aw

sel message
,case WM_COMMAND
,if(g_tbkb_aw and hWnd=win)
,,act g_tbkb_aw; err
,g_tbkb_aw=0
,
,case WM_ACTIVATE
,if(wParam=0) g_tbkb_aw=0

Now, when I execute the macro, the virtual keyboard appears and I see that the arrow keys allow me to move around the virtual buttons. Then I have tried to type some keys in Windows Notepad, but when I press the space bar, my virtual keyboard disappears, having written nothing in Notepad. I have noticed that now the virtual keyboard takes the focus, so that when it appears the Notepad window is no more active.

I think that perhaps the problem is that I have not understood your last phrase:
"assign it to the toolbar (in Properties)"
How shall I do it?


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)