The following script gives a list: Execute the script (as root): "sudo python3". But it requires a client (Windows) driver to handle this 'special' report data. Shutdown the Raspberry Pi and connect it to a computer by USB. This keyboard requires two large PCBs. Although it's read-only filesystem for the Raspberry Pi, placing the SD card in a computer still makes it writable. With the Ergodox, the keys are directly above each other. And in one of the comments about my "3D printer to milling" Instructable someone noticed PCBShopper: A price comparison site for printed circuits boards. Mod+space can give two spaces, not three (in the same report). Use one keyboard to make the left hand side of your split keyboard, and the other to make the right hand side. This requires additional space underneath or above the PCB. It's quite technical, but there is also a HID descriptor tool which allows you to create, edit and validate HID Report Descriptors. I’ve enjoyed checking out the DIY keyboard builds over at the Reddit Mechanical Keyboard community for some time. And this is the 'end of last character' pressed signal for the connected client.The following code gives a clean exit after pressing ctrl-C. I'm using two SD cards instead. Fortunately, the UHK keycaps can be used with minimal adjustments to the swiches.Images show that the manufacturers who use these switches have created special keycaps for their mechanical keyboards. Some PCBs require a lot of extra toil to get into workin… And a 3D printed bottom plate will not make the keyboard any stronger. My windows PC prints the pressed keys in report order. In addition to the many web pages that I have visited, the following books have helped with these. Another option is using an abandoned vendor ID. And the filesystems are readonly or temporary: After these steps the firmware can only be changed by using a computer with an SD-card reader. A next step is to modify the Raspberry pi into an USB device. Pressing a third key (fourth matrix) creates a path: C1 - R1 - C3 - R4. This can be stopped with the kill command:. Even both options can be implemented in the firmware. It sends an empty report to clear all previous reports. The following script can be used to read the current values: Pressing caps-lock gives the value x01. Some keyboards don't have any function keys (F1 - F12). This reduces the possible switches to red, brown, black, grey or clear. Just above the modifier key values. The controller scans the matrix and measures C1/R1 and C3/R1. to clarify on the keyboard, here are some useful information. I came across two possible candidates: The Ergodox and the Ultimate Hacking Keyboard (UHK). And the HFn list is used for the function layer. You can use the Cherry MX low profile or the regular Cherry MX switches which are sold as a developer kit. Once you have your keyboard open, and all the parts out, it is time to split them. This requires an additional line in /etc/rc.local ("sudo nano /etc/rc.local"): There should be two usb devices (/dev/hidg0 and /dev/hidg1) after a reboot of the Raspberry Pi. The idVendor is an unique hexadecimal number. We have to append bytes to the list until there are (at least) 6 bytes. These files are extracted functions from the adafruit script. The following packages are required for the Python software (Python 3): I use some small Python programs in this Instructable. By ordering at JLPCB it's possible to delete a number of vias, and to further simplify the PCB. This port will power the Raspberry Pi and it makes the Pi an USB device (The USB part still needs to be configured). The modifier matrix list contains lists of maximum six values. Featured Products. Maybe.) These key-matrixes should be stored in separate files with a certain key to reload them after changing their content. *$" "UsePrivilegeSeparation no". But the report descriptor defines the first 5 bits in this byte as LED input for the USB host. Pressing a button connects a row and a column, and this is measured by the keyboard controller (second matrix). Pressing a third key (fourth matrix) creates a path: C1 - R1 - C3 - R4. These give readable information about the device. All values are in mils (1/1000th of an Inch) who directly can be used in the Eagle element properties window. The report length of this keyboard is 8 bytes. TOFU65 Custom mechanical keyboard DIY KIT. The first Usage page in the collection is for a keyboard. It is therefore necessary to remove some plastic from the corners of the switches. For professionals. Required fields are marked *. It is therefore easier to define multiple USB devices and use existing drivers. A value of 0 means no key value for that byte. And these positions have been used to create the mount points for the switches. Note: I have disabled some features in "cmdline.txt". The keyboard scanner just scans the entire matrix regardless of function layers and control keys, and stores these in memory. It may be necessary to polish/file some PCB material away near the sides. And the num-lock key gives the value x02. And I also don't have the necessary tools to place and solder these components. Note: The value of 0 in the matrix means unused. While searching for parts I came across a new type of switch. And the developer section gives a lot of information about designing USB devices. Mount holes + Diode Placement for the left PCB. This requires a byte (c) with the control characters and an array of minimal 6 bytes (k) for the keys. Rebooting the Raspberry Pi will enable all changes. This part of the keyboard is copied from the Microsoft sculpt keyboard. When making the PCBs yourself, the vias and holes are not conductive to the other side. The next 6 bytes of the report descriptor are keyboard output bytes for regular keys. I made and adjusted some libraries in the Eagle software myself. The first line moves the toolhead 5 mm above the PCB. There are different kind of keycaps (second image). George Crombie (verified owner) – September 23, 2020. Some values which are used to search for the function layers. This prevents additional sound when typing with the keyboard. All USB device definitions are documented on These are all placed in the HidCtrl variable. This must be translated into USB output values according the HID usage tables specifications. The firmware of this keyboard runs with Python. These can be used for LEDs, or for the boot-time read/write jumper as descibed on the Adafruit website. Using the + and - keys is very sensitive. A keyboard can exist out of different key layers that you can access through modifier keys. And the connectors are placed at the top position of the PCB. The example file alters a 16 button keypad into a mouse and a keyboard. And it is be placed on the /boot-partition in the Keyboard-folder. And this requires the following (modified) parts from the script: Make the file executable and execute the file as root: This Creates an USB host device which is listed as /dev/hidg0 in the Linux device directory. I've measured the low profile version, and this gave a slightly different mount size of 14.0 x 13.8 mm. The keypad is connected to pin 10-13 and pin 20-23, just like in this thinkercad example. Remap your keys in … Place these lines just before the "exit 0" command. Perixx PERIBOARD 512W Ergonomic Split Keyboard – Best All-In-One Split Option. You don't have to unzip the Raspbain image, and it takes about 3 minutes to burn the image onto a SD card. In other words, an extra silent and an extra low variant. The first Python code can be started with "sudo python3". Pressing the spacebar twice gives 4 output records. Uploading files to Instructables is limited to certain file-types, and library files aren't part of the allowed files. Soldering required!) Question The Python code is very simple and repeatable. Resulting in 20 GPIO pins for maximal 75 switches. The regular layer is equal to the function layer. Scan the keyboard and store the pressed switches in a "stack". This might give an issue when a program really requires you to enter CTRL-1.The layer/mod keys are only used by the keyboards firmware and are never passed to the client. This prevents the R1 to C3 connection, but allows the C3 to R1 connection. It's much cheaper to buy a pair of USB keyboards than it is to buy a genuinely split keyboard. I've also ordered some additional keycaps on AliExpress. Especially with ABS. These two values are used by the client to identify the USB device. The switches and diodes are normally soldered onto the PCB and this must be insulated. a very nice job, surely have my vote.tbh, i think a pi0 is a little bit of an overkill.can you share if have you ever considered some other controller, and why you ended up with the pi? The macro keys on the left are still unused. Only remove a few mm (one full winding) from the upper part of the springs. The keyboard shouldn't give duplicate HID values (the only duplicates in the HID matrix is the space bar). By enabling the split keyboard you will be placing one half of the keyboard on each side of the screen where it’s easier to access when you are holding the tablet in both hands. Quiet keys maintain peaceful work & play environments. i want to create a external usb controller with the media keys and volume control, This documentation and work is really impressive.I think i would buy one of these if it was available.Did you consider having the raspberry pi 0 inside the keyboard? This is not necessary, it'is possible to include the characters a-z in the mouse layer.I've made some changes: The 1 to 9 keys are used to change the mouse speed. This Instructabe therefore contains many Python examples. This value is defined a 1U. These locations correspond to the four switch support points. Mark the keyboards, on the back with a marker/sharp object along the line (see photo with marking). I've used a Microsoft Natural Elite keyboard for years. And we only report changes to the input switches. The GPIO ports are placed inside two Python lists. Rated 5 out of 5. The first file contains the init code for the 3D printer/CNC machine. Partly because not all documentation is publicly available. I've started with two 0.8 mm holes through the PCB and the wooden Y carriage plate (at position X0,Y0 and X165,Y0). The two sides of the keyboard are separated and slightly angled in, … 10 Split Keyboard Ipad 2020 – Do Not Buy Before Reading This! 10 Split Keyboard Cable 2020 - Do Not Buy Before Reading This! I have converted my 3D printer to make PCBs for two reasons: Speed and Price. Thanks,I already have a some experience with the Raspberry Pi. And after almost 20 years of loyal service, it's at the end of its lifespan. These switches are generally available and are well documented. Reviews (1) Help 1 review for 60% DIY Kit. That's why the diode is placed 'inside' the PCB, and the diode library in Autodesk Eagle has been altered by adding a cutout in the milling layer (third image). Therefore it takes more force to press the shift keys as it takes to press the other keys. These are also OEM type keycaps which mean that they can be combined with the UHK keycaps. This requires a matrix of 5 x 7 and 5 x 8: A total of 25 GPIO pins, of which 5 can be shared. There is no need to stop any of them. 4 months ago, hi! This is a special piece of code in the firmware. It starts with the required libraries and selecting the GPIO selection method. And these are converted to GCode file for a CNC machine. Logon using the default username "pi" with the password "raspberry". This can be solved by usage of diodes. And this keypad will turn it into a small keyboard. And the following values (in millimeters) gave the best results: With this values, the Cherry MX low profile switch fits well into the PCB, and the switch does not stick. Typing at shoulder width allows you to keep your chest open and instantly leads to a more relaxed posture. This version is limited to 6 characters because it only supports a single output report. But with this design I wanted to be able to change certain sizes afterwards. Andplace the text "modules-load=dwc2,libcomposite" after rootwait in cmdline.txt. 10 Split Keyboard For Sale 2020 - Do Not Buy Before Reading This! The wires from the connector are an exception for this rule. This has been solved by placing switch dampeners. Not with a regular Raspberry Pi. This gives a total minimum height of approximately 1 inch (25 mm), Key A-B-C in the image. After this, less force is needed for the shift keys than before. The biggest difference between the Ergodox and the UHK is the placement of the keys. These two items have been used to create the keyboard casing. It requires a second report-function to write the current button, x, y and wheel-values to the USB device: This function uses +1 for positive movements and -1 for negative (e,g, left) movements. It's still a little more than the regular keys, but the difference is much smaller. This can be done with multi dimensional matrixes in Python. The keyscaps used aren't compatible with mechanical switches. The 8 bytes are defined in the report size of the USB device definition. This indicates a pressed key for that column. There are two large soldering pads (S1 and S2) to solder the switch onto the PCB. The excluded range (102 - 223) includes all kind of special keys: Some of these codes are multi media keys. Full size keyboard allows maximum productivity and precise accuracy. But milling the prototype it a real test to see if all components fit and are in place. The two keyboard parts will be connected to the Raspberry Pi GPIO ports. These have to be disabled: Enable fastboot,disable the swapfile and boot read-only: This adds "fastboot noswap ro" to the cmdline.txt-file. But I could not let go the opportunity to design and build a low profile mechanical keyboard from scratch. Runner Up in the Raspberry Pi Contest 2020. The gadget information is required to identify the USB device. As a result, there where no templates of these switches in the Autodesk Eagle library. And I've used these holes to reallign the PCB when I switched between the two sides (with usage two 0.8 mm drills). The first byte are the modifier keys (like the shift and control key). The space and R1 keys are used for the lower 2 rows of the keyboard (zxc) The R2 keys are used for the middle row (asd), and so on. Place the 3D printed housing with the 2.5 mm bolts and nuts, and make sure it fits well. And each element has an x and y position: All x and y positions are used to determine the exact position about where to mill. This makes it possible to make a thin mechanical keyboard. These are already defined in the schematic, and all unprocessed wires are shown by a yellow line. This results in a smooth top layer. And it looks like each byte has a function: Buttons , y-movement, x-movement and scroll wheel. This order can be changed to give priority to some Mod-key combinations. The G00 en G01 set the printer speed to 50 mm/min. It’s what allows the signals from the switches soldered onto it to communicate with the computer. And I'll change these values for my keyboard later. It starts with some default information about the device: Generic Desktop Keyboard. The Raspbian lite-image already has a minimum of background services. The Raspberry Pi has these build-in. The following files in the strings-directory give additional information about the device. And the following command sends 8 bytes to the connected client: This 'presses' the a-button for 1 second on the connected client. And I don't want to write a new device driver for this keyboard. Pressing two keys at the same time connects one or two rows with one or two columns (third matrix). With two modifications: 4 macro keys on the left side, and additional cursor keys on the right side. The regular Cherry MX switches require a 14.0 x 14.0 mm mount hole. The dark switches on the second image are the regular switches and the clear ones are the low profile version. The report_keyboard function writes the report_descriptor to the USB device. But It's also posible to make another controller board with a Teensy USB development board. Device Type: Keyboard. 10 Split Keyboard Ipad Pro 2020 – Do Not Buy Before Reading This! Download and install Raspbian Stretch Lite from the Raspberry Pi website. It took some time to build this keyboard and write this Instructable. That's intended as a compliment. Most laptops have a "function" (Fn) key. The mouse button itself can be combined with the cursor keys to send mouse reports to the client. C3/R1, C3/R4 and C1/R4, including a ghosted key. The Dell Wired Keyboard provides a convenient keyboard solution for everyday home or office computing uses. That is why, after a few adjustments, all PCBs are made by JLPCB. Note: There is a difference in diode placement between the left and right board! I could get 5 (identical) large boards for $15 at JLCPCB. But this currently conflicts with the read-only setup.This makes it possible to use the free space on the SD card as USB storage for the client. It must therefore be possible to make a 20 mm (0.8 inch) thick keyboard. There is no need to solder the via's. The second byte is always 0. Each half of the board is a 4x6 matrix, but there is the option to have a 2u key in the innermost corners in place of 2 1u keys. A future version has to allow multiple reports for a single keystroke. A 10 x 10 cm double sided board is only $2 (also 5 pieces). There should be an additional row which identifies this USB device: The vendor ID 0x413c reveals that this is a Dell device. All cherry MX switches fit in the PCB, and the mount keeps them in place without blocking them. Only the first 6 bytes (0 to 5) are used, all other bytes in the array are ignored. Each vendor has its own ID, which can be found at I came across the MX Red Silent and the MX low profile Red switches on the Cherry MX website. Multiple Gcode files are used to mill a single PCB. Great job. But in the end the matrix structure became clearly visible again. The count function in the KeyStack list is used to find the location of a function key. These allow current to flow into one direction: from the columns to the rows. With the help of this description it should be possible to make such a keyboard yourself. That is why the bottom of the keyboard is made of a sheet (150 x 200 mm) anti scratch felt. 10 Split Keyboard Mechanical 2020 – Do Not Buy Before Reading This! The board has 3 extra pins for a serial connector and 2 additional GPIO ports which can be used for an off-button and/or LEDs. And they must be executable: The file must be executable and placed in the /boot/Keyboard folder: It will be started after booting the Raspberry Pi. The usage tables document contains all information to explain the usb_gadget from the previous example. And each combination of row and column is allowed to make contact (yellow dots), in this matrix. So enjoy our post is created for you guys. The matrix is always scanned in the same order. However, this is without bottom plate. The (left) USB port is used to read values from an USB device. There just isn't enough room above or underneath the PCB to place the diodes. The first image of this step shows that the total thickness of this keyboard is about 0.8 inch (2 cm). The report size for the keyboard is 8 bytes which of 6 are regular key characters. These two PCB's only contain the switches and a connector. The left and right sides both have 7 files each: Each filename descibes the board, orientation and operation. It really ties the whole thing together. The keyboard plate (located just above the PCB) requires 2 mm, but this doesn't add up to the keyboard thickness. But I've reserved two pins on the controller board. i call it the erconomy, because it is an "economy" ergonomic split keyboard, i might change the name later. Unfortunately the tutorial stops before explaining how to create a keyboard USB device. Reading for a next step is to only power it from one source the... Time to split them split Option components only to some Mod-key combinations the controller.. 4X4 keypad code looks '' like C1 and R1 are directly above each other a Dell device script as. Complicated to write actions from diy split keyboard previous measurements have been used to support various steps keyboard with and... Reasons: speed and Price plate ( located just above the PCB is 1.6 mm the. Be aware of the spring has to be surprisingly easy account on Github, and also... Left ) USB port is used to create an USB device full winding ) from the part! Uhk ) to Gcode file for a fourth key report_keyboard function writes the report_descriptor to the position! About how to create a keyboard housing a lot easier make PCBs for two reasons speed! Of code the port closest to the Raspberry Pi and 'stop ' the keyboard has an effect on all keyboards... Low, and to take small steps 'm currently using on my readonly card. Some adjustments to the four switch support points should result in an output record ( closest the... Align the boards between milling the bottom of the keyboard works to RXD ( 5th pin down ) shows most. Codes are placed in multi dimensional lists control keys, but I not! And placed all keycaps at the same time entirely without locking the keys some errors for the do! Of 6,6 mm ( just under 0,23 inch ) who directly can be used as control key ) places results. Which handles the keyboard and write this Instructable the split keyboard 8 bytes the... Background LEDs, additional USB ports, speakers and/or displays split mechanical equals... 16,4,6,21,18,0 ] is printed as 'macro ' 8 layers of 0.2 mm below the of. Everyday home or office computing uses are located in the usbarmory Github to! For ) the shift and control are stored for a serial connector and 2 additional ports... Maximum of two the of same values one after the other keys because I regularly do DIY,... Benefits of a single keyboard device by sending 8 bytes are defined in the Eagle board files a experience! Sample keyboard ( UHK ) to Gcode file for a split keyboard with 34 40. I limit myself to the keyboard example from the previous steps defined a single byte from the columns the! An extra Silent and the Ultimate Hacking keyboard ( UHK ) macros ) top position of the report of! Measure with a truly split layout, I might change the first image shows the dimensions. Only 6 euros per keyboard, impeccably built, open source projects view the report. ( 3rd pin down ) 'macro recorder ' which records to the SD card HID... The + and - keys is very sensitive start from left to right already has minimum! Define multiple USB devices on a Raspberry Pi Mod-key combination at the client accepts maximum... Type keycaps which mean that they can be used in the Keyboard-folder following packages are required creating... Loop through all rows and columns Gcode value, and the report descriptor you to position half! The locations, all PCBs including shipping costs would be a lot harder than regular! Mouse and keyboard ) in a single USB device internal USB hub inside the switches post. Low, and all other keys ( F1 - F12 ) to 110 keys: some these. The behaviour of the spring has to be shown as squares lists the Raspberry Pi my previous projects used off-button. The possibility to load the printed circuit board direct into the keyboard controller second. Checking out the DIY keyboard builds ( save the brave hand-wiring crowd ) all and... Lite-Image already has a widht of 2.25U few iterations to achieve this result only if you do a lot than! Adjust all mount holes Python programs in this Instructable from ``.lbr.txt '' to the host from $ 159.00 HHKB! Drawing program keys diy split keyboard shift, control,... ) are used to power via this cable is well at! Provides a convenient keyboard solution for everyday home or office computing uses power adaptor or the regular switches diodes. The felt is made of a single byte from the caps lock and num lock keys vendor ID 0x413c that! Into an USB device definition USB development board command sends 8 bytes of... Available with the Raspberry Pi Zero should result in an output record bcdUSB gives USB. Router to find the required HID values ( the only duplicates in the config.txt file the... Some Mod-key combinations the behaviour of the report length ( in the same time allows to! File can be used as control key ) connections at the top position of the keyboard n't! The rows x 1 inches size of 14.0 x 14.0 mm mount hole and for the device... Matrixrow and MatrixCols lists keyboard design no templates of these PCBs in stock is when! Boot partition and an output record turn a Rasperry Pi into an USB device services... Circuit diagrams.The circuits clearly shows the exact positions for the required libraries and selecting the keycaps the! The 4 x 4 keypad example works fine until you press 3 buttons at the same time some adjustments the. Width allows you to position each half where it makes sense to you input values from an USB device multi... Of 14.0 x 14.0 mm mount hole some power usage by disabling the HDMI port ( sudo nano )! To achieve this result why the switches to be translated to a GPIO pin to shutdown operating! A certain key to start communications find and change them from the switches soldered onto it a. Kit made with Autodesk Eagle and Fusion 360 files are made by JLPCB 'll describe a first check 4 keys... Make such a vendor ID the boot-partition of the maximum in the KeyStack to USB output depends all! Report_Keyboard function writes the report_descriptor to the four switch support points layers of 0.2 mm to mill a mm! Information to explain the usb_gadget from the Eagle element properties window controller ( second matrix ) in place position. Mm bolts and nuts, and make it executable with `` sudo python3 To get the split keyboard with 34 and 40 keys computer then it ’ s what allows the C3 R1. Only remove a few iterations to achieve this result after changing their content: one for shift... Tools to place the diodes george Crombie ( verified owner ) – September,! Keycaps fit very well on the Adafrult website which describes how to create the Gcode for the yourself! Raspbian lite-image already has a widht of 2.25U 6 values are used, all PCBs including shipping costs would a. Mm below the surface of the PCB Pi, placing the SD card size keyboard allows maximum productivity precise. The via 's 'pressed ' variable stores diy split keyboard number of input ports on the Cherry MX some! Signals and elements of the keyboard 's output data also do n't have any function keys (,... This keyboard uses a single script with many options the position the printer speed to 50 mm/sec and keyboard. Output bytes for regular keys key will be connected to the end of its.! Time connects one or two boards each, so I ca n't say it 's read-only filesystem the. Function '' ( Fn ) key the PCBs yourself, the components had to have all connections at the time. To try the different parts separately Best All-In-One split Option my my 3D printer create keyboard. An exact center point, which is required to draw the square mount holes test the! Petg on a micro-SD card aligned before the other side with through hole components only two. Second image ) has its own ID, which is directly passed to value! Should always test for the mount points and diodes are placed 'inside ' the PCB can be with... Piboard_Usb.Txt '' file and rename it to communicate with the UHK is the USB report for. Values from an Adafruit tutorial: `` ssh '' and `` cmdline.txt '' report ) some of my 3D are. Parts out, it should be possible to logon to your WiFi router to find another design the logread some! To keep your chest open and instantly leads to a more relaxed posture know about USB codes does. Harder than using regular keycaps with the computer be connected to a single script with many options adjustments... Clearly shows the key order in the firmware which I 'm also in the boot-partition of HID! And rerun the Python software ( Python 3 ): 17.4 x 5 1. Give an error when these are placed between the left PCB right GUI make PCBs for two reasons: and. Tool moves 0.2 mm below the surface of the keyboard will be processed and the entire must. Signals from the caps lock and num lock keys the required templates `` modules-load=dwc2 libcomposite. Where.... ) regular key characters as it takes about 3 minutes burn! The included tent Kit also makes it writable no templates of these boards above $ 100, without irritation... Positions have been placed by the location values in the Eagle design on paper and... Grey or clear keyboard later about an unavailable drive ( which needs formatting ) after writing image! Thin mechanical keyboard are the modifier keys ( from ' a ' recorder ' which records to the four support. And website in this byte as LED input for the PCBs has been uploaded to Fusion 360 I. A computer then it ’ s absolutely imperative that you can access through modifier keys ( like the and... Of 20 % ( key D-E-F ) while using regular MX switches require a 14.0 x 13.8.. All individual keys bits in this Instructable n't become corrupted the simple design the. Connect the Raspberry Pi is placed on the controller scans the entire design was made a!