F-Key Router for keyer programs

A Small Utility: F-Key Router for keyer programs



When operating CW, function keys quickly become muscle memory. Most logging software maps F1–F12 to macros — CQ messages, exchanges, TU, QRZ and so on.

The problem appears when the logging program does not have focus.

You might be typing in another window, checking cluster spots, or adjusting some other software. Pressing an F-key then does nothing for the cw keyer, because the keystroke goes to the active window instead.

To solve this I wrote a small Windows utility: F-Key Router.

The program listens for function key presses and forwards them to a selected application window, regardless of which program currently has focus.


What the Program Does

The program is intentionally minimal.

It does only three things:

  1. Select the target window (for example Log4OM, N1MM, or another logging program)

  2. Start listening for F-keys

  3. Forward the keypress to that window

This means you can press:

  • F1 for CQ

  • F2 for exchange

  • F3 for TU

…even while another program is active.


Example Use Case

A typical station setup might include:

  • a logging program with keyer connection

  • a DX cluster window

  • radio control software

  • a browser or other tools

Normally you need to click back to the logging software before using the function keys.

With F-Key Router running:

  • the logger window is selected once as the target

  • F-keys are always delivered there

You can interact with other programs while still triggering the CW macros instantly.


Simple Interface

The interface is deliberately simple.

Controls:

  • Choose Window – click the button and select the window you want to direct keystrokes to.

  • Start – begin routing keys

  • Stop – disable routing

No installation is required. The program is a single executable.


Updates – Version 1.2 and 1.3

Version 1.2 – Focus Handling Fix

Version 1.2 resolves an issue reported by users, where two key presses were required before the CW macro was triggered.

The cause was how the focus was handled . In some cases, the first key press only activated the window, and the second actually triggered the macro.

This behavior is now corrected.
A single key press is sufficient, to focus the window, and route the keypress.


Version 1.3 – Keep Focus Feature

Version 1.3 introduces a new Keep Focus function, allowing more control over how focus is handled after sending a key.

There are three modes:

OFF
Focus is returned to the previously active application (original behavior).

ESC
When ESC is pressed, focus is kept on the selected window.

Typical use case:
You are calling CQ (e.g. F1) while browsing or using another application.
When a station replies, you press ESC either to abort the CQ sequence, and shift focus to the logger.

Focus remains in the logger, allowing immediate typing of the callsign.

CUSTOM

Same as above, but the keys that keep focus is selected by the user.

Keys are defined directly in a .JSON configuration file that gets created on the first start of the program

Example .JSON below, with ESC, F1, F2 selected

"Edit custom_keep_focus_keys manually when using custom mode", "Valid keys: esc, f1–f12" ], "keep_focus_mode": "custom", "custom_keep_focus_keys": ["esc", "f1", "f2"] }

This might be useful in contests, or in scenarios where you want multiple keys to route and retain focus in the logger/selected window.


Thanks to Piotr SQ5J for valuable input and testing of the focus handling behavior.


Download

You can download the programs here:

Download F-Key Router V1-V1.3

The program is standalone and should run on any modern Windows system.


Comments

Popular posts from this blog

My HP8640 died!

The Power Amplifier build. Part 2

ARC-5 receiver power supply, an in depth look.