Motivation of this keyboard is I want compact, small keyboard with dedicated PageUp/PageDown key. Most of small keyboards mapped Fn+Up/Down for PageUp/PageDown but I fed up pressing Fn key for PageUp and PageDown!! Pointing device is also quite handy when I want to click something while typing.
- 86 Kailh mini choc switches for keyboard keys.
- 2 Kailh X Switches for mouse buttons.
- 1 Top-up JT8P analog stick for pointing device.
- Seeed XIAO as controller.
- LED under each keyboard keys.
XIAO has 11 IO pins. I used 10 IOs for key matrix and 1 IO for analog input to read X/Y of analog stick.
By using charlieplexing technique, 10×9 switch matrix can be created. 2 cells of matrix are used to power analog stick.
External slide switch tunrs on/off LEDs as there wasn't enough pins to controll LED.
I'll describe a bit how analog stick is sensed.
The analog stick I used is simply pair of potentiometer. To read position, connect VCC to one end, connect GND to the other end, and read divided voltage using analog input.
Above circuit uses 2 analog inputs, but I have only 1 analog input. So connect 2 IOs to potentionmeters via diode like below image.
If D10=H and D9=L, A1 value is position of X. If D10=L and D10=H, A1 value is position of Y.