Skip to content
cajhin edited this page Jun 13, 2023 · 7 revisions

Some keys are not recognized

Some special keys (media keys, power keys and the like) are not real keys, and they don't send a "key pressed" event.

capsicain does not handle these 'buttons', at all. Check if Autohotkey maybe has a special handler.

To check if a key is a "real" key:

  • enable debug output [ESC]+[D]
  • press a normal key like [A] : you should see a new line
  • press the special key. If there is a new line, read the key name. If there is no new line, it won't work.

Some key combos are not recognized

There is a hardware issue called "ghosting", which means that on some keyboards, some key combination blocks other keys.
For example, when I press W+A+S+D on my Apple keyboard, only W+A is recognized, but that combo blocks S+D.

This is a hardware limitation. The only workaround is to use another keyboard (google 'key ghosting' and 'n-key rollover').

Generally speaking, the 'real' modifier keys like shift don't block anything else. Two-key combos are always ok. 3 or more keys, with keys on the same physical row or column, might block each other, unless the manufacturer spent a couple extra $$ on the logic board to prevent this.

To check if your keyboard can see certain combos, use this test page: https://www.microsoft.com/applied-sciences/projects/anti-ghosting-demo

Sending SLEEP does nothing (probably other keys, too)

It seems that Windows does not react to the old SLEEP key, my Logitech instead sends some USB event that is not a key.

The keyboard worked, but after sleep it doesn't

There is a known issue with some Bluetooth keyboards.

Only rebooting might help. Basically, if the keyboard gets a new ID after the PC sleeps, you might hit the 10 device limit of the Interception driver.

I only encountered this with a specific bluetooth keyboard, not with Logitechs (which have dongles).

See https://github.com/cajhin/capsicain/issues/70

Special çhärš with AltChar() worked, but now they don't, after I touch a VirtualBox VM

For AltChar combos in Windows, NumLock must be ON.
Even if you don't have a Number Pad, Windows still tracks the NumLock status.

VirtualBox syncs the NumLock state of the VM with the state of the host, by checking the NumLock LED (doh!)
If your keyboard has no NumLock LED, then VirtualBox sets the state to OFF every time you enter the VM.

Fix: VBoxManage setextradata "<vm-name>" GUI/HidLedsSync "0"

Thx Martin for figuring it out

ERROR: Received unexpected SC_NOP Key Stroke code 0.

This happens when the Interception driver is not installed. Check the installation guide.

Windows 11 version 22H2 cannot minimize to tray

Short Version

Don't start capsicain.exe directly. Create a shortcut that starts
conhost.exe c:\your\path\capsicain.exe Also set "Start in:" to your capsicain folder.

Long version

Windows 11 comes with a new, better console called Terminal. The 22H2 update makes this Terminal the default.

The Terminal window can now host many console apps in tabs, therefore apps must no longer control the state of the window.

Result capsicain can no longer minimize to tray, and remove the icon from the toolbar.

Workaround A: make a shortcut to the old console

Explicitly start capsicain in the old console host. To do so:

  1. in Explorer, create a shortcut for capsicain.exe (drag&drop the exe with the right mouse button to a free area)
  2. right-click the Shortcut > Properties
  3. Change Target to conhost.exe "c:\your\path\capsicain\capsicain.exe"
  4. Change Start in: to "c:\your\path\capsicain\"
  5. If you like, Change Icon and point to the capsicain.exe
  6. To auto-start on Windows startup, open shell:startup and copy the shortcut there

Workaround B: make the old console the default

I do not recommend this; the new Terminal is nice, and I want to run most batch apps there.

To make the old console host the default:

Start > Settings > search for 'Terminal Settings' > Terminal > select 'Windows Console Host'

(You can also change the default in the Terminal app itself under Settings > Default terminal application)

Clone this wiki locally