The concept of the BaGua keyboard is publicly announced for the first time, original. The materials disclosed in this project are limited to communication and learning!!
I designed a BaGua layout keyboard, named BaGua Keyboard. Its overall design absorbs the concept of the two instruments giving rise to the four symbols, and the four symbols giving rise to the eight trigrams, overcoming the shortcomings of general customized keyboards in layout.
Its design reference is the Raspberry Pi 400, achieving a more portable and practical functional design than the 400.

The BaGua keyboard uses a 61-key layout.
The classic 61-key layout comes from the most commonly used full layout, making it easy to use. However, it removes the F row, ESC key, all navigation keys on the right side, and the numeric keypad, which are relatively critical keys. It loses higher convenience.
Therefore, I improved the 61-key layout, and now it even surpasses the 98-key layout, specific details are mentioned below:
Whether the keyboard features are rich depends on the number of IO pins.
Taking the 61/63/64 keyboards as an example, the laziest way to arrange keys is a 5-row x 12-column layout. However, this occupies 17 IO pins and only gets 60 distinguishable key positions.
To save IO pins, the closest row and column number to the square root must be used, such as an 8×8 layout, which only requires 16 IO pins and can get 64 distinguishable key positions.
To achieve a certain function, the more IO pins are saved, the larger the range of selectable chips.
In summary, I found that the combination of BaGua Yang Yao and Yin Yao can create the “8×8 Gua Number” that balances the keyboard between portability and practicality. This is one of the reasons why the keyboard is named BaGua.
I drew the 8×8 layout for a long time, but fortunately, it was worth it.


Having determined the BaGua layout, let’s talk about appearance and functionality.

The above image shows the key distribution map of the first generation keyboard I designed. In addition to the 61-key layout, I also added 3 expansion parts, including: a five-way switch, a joystick, and a handle.The purpose of the expansion parts is:
By using a five-way switch/joystick/handle to replace the 4-way keys, costs are reduced and it is more portable.
If you are in a hurry and forget to bring the mouse, don’t worry, this keyboard has mouse keys set up. The large Tai Chi wheel in the image is defined as the function of the mouse middle scroll wheel, so the mouse function is complete.
Of course, when not in use, you can define the mouse function to other functions.
Regarding the placement of the ESC, DEL, and Fn keys, they can be placed according to the needs on the rotary encoder, five-way switch, dial encoder, joystick/handle.All expansion keys on the keyboard can increase programmable key positions.
In this way, although the BaGua keyboard has fewer keys, its functionality is complete…
Seeing this, do you think the improved 61-key layout is attractive? Do you think it is superior to the 98-key layout?
Let’s not rush to answer, regarding its final product, let’s continue to look below!
As mentioned at the beginning, the final product of the BaGua keyboard incorporates the concepts of the four symbols and the two instruments. So how is it integrated?
The four symbols traditionally refer to Shaoyin, Lao Yin, Shaoyang, and Lao Yang.
In my BaGua keyboard design, the four symbols refer to the four functions expanded through the Hub:
-
One is the main key matrix
-
One connects the touchpad
-
One can externally connect a mouse on the right side of the keyboard
-
One is in the upper left corner of the keyboard. It can connect a USB flash drive or other peripherals, such as: FOC motor knob, drawing pen, handwriting board, etc.
The original meaning of the two instruments is Yin and Yang, which are the two opposing sides of a thing.
I often need to use the computer and Raspberry Pi, but I don’t like to add another set of mouse and keyboard for Raspberry Pi because it takes up too much space on the desktop, which is a contradiction.
I designed a key to quickly switch between two computers/terminals, so that while searching for information on the computer, I can quickly switch to the Raspberry Pi that just booted into the system and input commands from the information.
Finally, a complete BaGua keyboard looks like this:

In addition to the above functions and roles, the BaGua keyboard has the following 4 functions:
The hollow handle above the keyboard is soldered to a micro:bit base, which can be used to fix and power the micro:bit development board. You can also place your phone in the hollow space.
To the right of the two-instrument key in the upper left corner of the keyboard, there is a Raspberry Pi Zero/Zero W installation position, allowing the Raspberry Pi to become one of the two instruments without additional complex wiring.
Therefore, in the upper right corner of the keyboard, I also designed two TF card storage slots, which can quickly switch when developing different projects or flashing different systems on the Raspberry Pi.
Through the bottom LED flashing randomly to obtain divination results by stopping at different key positions. In addition to being used for divination, I can also provide an idea to develop a one-key rainbow fart function.
This part will be left to interested readers to develop, this idea is free of charge.
I designed the BaGua keyboard to be a replaceable main control board mounting mode, and am trying to design multiple main control boards that can be replaced.
I have already completed: the official Raspberry Pi Pico board, the Pico replica board, and the ESP32 modified design (wireless), and the BaGua keyboard can be compatible with more chips in the future.
Supported main control boards for the BaGua keyboard: official Raspberry Pi Pico, Pico replica, ESP32 modified main control board.
1. Custom keyboards during the development phase will use hot-swappable key switch bases for convenience. Here, I specially fused two different hot-swappable bases, which can at least be made into physical keyboards for Logitech gtl and cherry MX, in line with the principle of small steps and quick iterations.

2. From the selected key switch components, it can be seen that I only included the pins for ordinary LEDs, but in practice, because ws2812 has richer color combinations, the mainstream use is:
-
For compatibility, all D1 and D2 pins of ws2812 are manually wired and given a network, which is very convenient.
-
To keep the wiring simple, I purposely mixed the two key switches with opposite directions of ws2812 packaging.
To demonstrate that the BaGua keyboard can become a Hanwen keyboard by “adding technical features”, I learned a bit about the Hanwen keyboard by ZhiHui Jun.
The characteristics of the Hanwen keyboard are very prominent, the two most obvious points are:
-
The keyboard uses multiple expansion IO chips for layout arrangement
-
Integrates an FOC motor as a feature knob into the keyboard
While the BaGua keyboard mainly learns its FOC motor knob technology.
However, the USB power supply and weight of the knob are significant issues, as they affect the portability of the keyboard. But if the feedback force requirement for the motor is not too high, reducing the driving power is also possible.
So I tried to achieve it in the form of a PCB motor, which can achieve a smoother feel than a rotary encoder without increasing weight and charging/discharging modules..
The only thing to note is that it cannot provide a large torque, so it is not suitable for certain game functions that require strong force feedback experience.
Of course, if you pursue portability, you only need to treat it as an external device independent of the keyboard, so it will not affect portability.


With the motor knob added, the cost of this BaGua keyboard is around 600 yuan.



This article only extracts part of the information, the original text is over 10,000 words, with super detailed descriptions. Partners who are not satisfied can click the lower left corner at the end of the article “Read the Original Text” to enter the original project for viewing.
If you have any other questions, you can also leave a message to the author at the bottom of the original project.
