Dedicated F-key keyboard for CWX

  • 2
  • Idea
  • Updated 4 years ago
  • (Edited)
Now that Flex has introduced CWX with dedicated function keys, it would be nice to have a dedicated keyboard to run the CWX macros.  I wrote a macro for my little XK-24 keyboard that accomplishes this.

First, here are the keyboards I am using that connect to the PC via USB:
http://xkeys.com/XkeysKeyboards/index.php

I use the XK-24, but any of these would work.  The long skinny "sticks" can be set directly above your main keyboard.

If you assign a function key to one of the keys on their dedicated keyboards using their included MacroWorks tool, you get this X-Keys macro written for you (viewing the code with the MacroWorks "Window/Script " menu):



                                Case 1001 'Button 001

                                                If State 'Pressed          [MWTAG10]

                                                                '<Keys[<F1>↓<F1>↑]>

                                                                MW3.sendScanCode("59:1,59:0")

                                                                '</Keys[<F1>↓<F1>↑]>

                                                Else 'Released             [MWTAG11]

                                                End If 'Press-Release      [/MWTAG10/MWTAG11]


All you have to do is add the following line of code to force the focus to SmartSDR before the F-key press is sent to Windows:

                              MW3.WindowToFront("SmartSDR")

and the result is this:

                                Case 1001 'Button 001

                                                If State 'Pressed          [MWTAG10]

                                                                MW3.WindowToFront("SmartSDR")

                                                                '<Keys[<F1>↓<F1>↑]>

                                                                MW3.sendScanCode("59:1,59:0")

                                                                '</Keys[<F1>↓<F1>↑]>

                                                Else 'Released             [MWTAG11]

                                                End If 'Press-Release      [/MWTAG10/MWTAG11]


Now, no matter which Windows app has the focus, the focus will change to SmartSDR and it will correctly receive the function key press and the CWX macro will transmit.

This code, with appropriate changes, can be used for all 12 function keys.  Almost like having a dedicated external keyer with its own keyboard.  It seems to be working well here.  The side effect of the focus change has not bothered me yet.

Also, you can send multiple f-keys with one key-press to link together CWX macros.  And I assigned an "ESC" key to abort the CWX macros.

(disclaimer:  I am not associated with P.I. Engineering, the X-Keys manufacturer, other than as a customer.)
Photo of Bob Wright, N7ZO

Bob Wright, N7ZO

  • 268 Posts
  • 65 Reply Likes

Posted 4 years ago

  • 2
Photo of Bill-W9OL

Bill-W9OL

  • 726 Posts
  • 56 Reply Likes
I use a gaming keyboard for contesting. 12 big paddle type keys, 6 on each side, all user programable. Cyborg Keyboad, cheap on ebay.
Photo of Steve W6SDM

Steve W6SDM

  • 622 Posts
  • 280 Reply Likes
Now that looks like a useful tool - especially since it seems that you can control other programs with Macros, like a LOG IT key for N1MM.  Have you done anything with yours besides the CWX functions?
Photo of Steve W6SDM

Steve W6SDM

  • 622 Posts
  • 280 Reply Likes
Okay, I got so intrigued that I bought a XK-24.  Bob, I sent you a message to your ARRL e-mail.  It looks like I am not going to miss my Hurcules controller as much as I thought.