@ -0,0 +1,48 @@ | |||
# Encoders | |||
Basic encoders are supported by adding this to your `rules.mk`: | |||
ENCODER_ENABLE = yes | |||
and this to your `config.h`: | |||
#define NUMBER_OF_ENCODERS 1 | |||
#define ENCODERS_PAD_A { B12 } | |||
#define ENCODERS_PAD_B { B13 } | |||
Each PAD_A/B variable defines an array so multiple encoders can be defined, e.g.: | |||
#define ENCODERS_PAD_A { encoder1a, encoder2a } | |||
#define ENCODERS_PAD_B { encoder1a, encoder2b } | |||
If your encoder's clockwise directions are incorrect, you can swap the A & B pad definitions. | |||
Additionally, the resolution can be specified in the same file (the default & suggested is 4): | |||
#define ENCODER_RESOLUTION 4 | |||
## Callbacks | |||
The callback functions can be inserted into your `<keyboard>.c`: | |||
void encoder_update_kb(uint8_t index, bool clockwise) { | |||
encoder_update_user(index, clockwise); | |||
} | |||
or `keymap.c`: | |||
void encoder_update_user(uint8_t index, bool clockwise) { | |||
if (index == 0) { | |||
if (clockwise) { | |||
register_code(KC_PGDN); | |||
unregister_code(KC_PGDN); | |||
} else { | |||
register_code(KC_PGUP); | |||
unregister_code(KC_PGUP); | |||
} | |||
} | |||
} | |||
## Hardware | |||
The A an B lines of the encoders should be wired directly to the MCU, and the C/common lines should be wired to ground. |
@ -0,0 +1,82 @@ | |||
# I2C Master Driver | |||
The I2C Master drivers used in QMK have a set of common functions to allow portability between MCUs. | |||
## Available functions | |||
|Function |Description | | |||
|------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | |||
|`void i2c_init(void);` |Initializes the I2C driver. This function should be called once before any transaction is initiated. | | |||
|`uint8_t i2c_start(uint8_t address);` |Starts an I2C transaction. Address is the 7-bit slave address without the direction bit. | | |||
|`uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Transmit data over I2C. Address is the 7-bit slave address without the direction. Returns status of transaction. | | |||
|`uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout);` |Receive data over I2C. Address is the 7-bit slave address without the direction. Saves number of bytes specified by `length` in `data` array. Returns status of transaction. | | |||
|`uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_transmit` function but `regaddr` sets where in the slave the data will be written. | | |||
|`uint8_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout);` |Same as the `i2c_receive` function but `regaddr` sets from where in the slave the data will be read. | | |||
|`uint8_t i2c_stop(uint16_t timeout);` |Stops the I2C driver. | | |||
### Function Return | |||
All the above functions, except `void i2c_init(void);` return the following truth table: | |||
|Return Value |Description | | |||
|---------------|---------------------------------------------------| | |||
|0 |Operation executed successfully. | | |||
|-1 |Operation failed. | | |||
|-2 |Operation timed out. | | |||
## AVR | |||
### Configuration | |||
The following defines can be used to configure the I2C master driver. | |||
|Variable |Description |Default| | |||
|------------------|---------------------------------------------------|-------| | |||
|`#F_SCL` |Clock frequency in Hz |400KHz | | |||
|`#Prescaler` |Divides master clock to aid in I2C clock selection |1 | | |||
AVRs usually have set GPIO which turn into I2C pins, therefore no further configuration is required. | |||
## ARM | |||
For ARM the Chibios I2C HAL driver is under the hood. | |||
This section assumes an STM32 MCU. | |||
### Configuration | |||
The configuration for ARM MCUs can be quite complex as often there are multiple I2C drivers which can be assigned to a variety of ports. | |||
Firstly the `mcuconf.h` file must be setup to enable the necessary hardware drivers. | |||
|Variable |Description |Default| | |||
|------------------------------|------------------------------------------------------------------------------------|-------| | |||
|`#STM32_I2C_USE_XXX` |Enable/Disable the hardware driver XXX (each driver should be explicitly listed) |FALSE | | |||
|`#STM32_I2C_BUSY_TIMEOUT` |Time in ms until the I2C command is aborted if no response is received |50 | | |||
|`#STM32_I2C_XXX_IRQ_PRIORITY` |Interrupt priority for hardware driver XXX (THIS IS AN EXPERT SETTING) |10 | | |||
|`#STM32_I2C_USE_DMA` |Enable/Disable the ability of the MCU to offload the data transfer to the DMA unit |TRUE | | |||
|`#STM32_I2C_XXX_DMA_PRIORITY` |Priority of DMA unit for hardware driver XXX (THIS IS AN EXPERT SETTING) |1 | | |||
Secondly, in the `halconf.h` file, `#define HAL_USE_I2C` must be set to `TRUE`. This allows ChibiOS to load its I2C driver. | |||
Lastly, we need to assign the correct GPIO pins depending on the I2C hardware driver we want to use. | |||
By default the I2C1 hardware driver is assumed to be used. If another hardware driver is used, `#define I2C_DRIVER I2CDX` should be added to the `config.h` file with X being the number of hardware driver used. For example is I2C3 is enabled, the `config.h` file should contain `#define I2C_DRIVER I2CD3`. This aligns the QMK I2C driver with the Chibios I2C driver. | |||
STM32 MCUs allows a variety of pins to be configured as I2C pins depending on the hardware driver used. By default B6 and B7 are set to I2C. | |||
This can be changed by declaring the `i2c_init` function which intentionally has a weak attribute. Please consult the datasheet of your MCU for the available GPIO configurations. The following is an example initialization function: | |||
```C | |||
void i2c_init(void) | |||
{ | |||
setPinInput(B6); // Try releasing special pins for a short time | |||
setPinInput(B7); | |||
chThdSleepMilliseconds(10); // Wait for the release to happen | |||
palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B6 to I2C function | |||
palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(4) | PAL_STM32_OTYPE_OPENDRAIN | PAL_STM32_PUPDR_PULLUP); // Set B7 to I2C function | |||
} | |||
``` | |||
@ -1,99 +1,97 @@ | |||
# Introduction | |||
Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when they are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom layout you are creating the equivalent of an .exe for your keyboard. | |||
Your computer keyboard has a processor inside of it, not unlike the one inside your computer. This processor runs software that is responsible for detecting button presses and sending reports about the state of the keyboard when buttons are pressed or released. QMK fills the role of that software, detecting button presses and passing that information on to the host computer. When you build your custom keymap, you are creating the equivalent of an executable program for your keyboard. | |||
QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful layouts, you only have to follow a few simple syntax rules. | |||
QMK tries to put a lot of power into your hands by making easy things easy, and hard things possible. You don't have to know how to program to create powerful keymaps — you only have to follow a few simple syntax rules. | |||
# Getting Started | |||
Before you can build keymaps you need to install some software and setup your build environment. This only has to be done one time no matter how many keyboards you want to compile firmware for. | |||
Before you can build keymaps, you need to install some software and set up your build environment. This only has to be done once no matter how many keyboards you plan to compile firmware for. | |||
## Download Software | |||
### Text Editor | |||
You'll need a program that can edit and save **plain text** files. If you are on Windows you can make due with Notepad, and on Linux you can use Gedit, both of which are simple but functional text editors. On macOS be careful with TextEdit.app, it will not save plain text files unless you make sure to select "Make Plain text" from the "Format" menu, or you can use another program such as Sublime Text. | |||
You'll need a program that can edit and save **plain text** files. If you're on Windows you can make do with Notepad, and on Linux you can use gedit. Both of these are simple but functional text editors. On macOS, be careful with the default TextEdit app: it will not save plain text files unless you explicitly select _Make Plain Text_ from the _Format_ menu. | |||
You can also download and install a dedicated text editor like [Sublime Text](https://www.sublimetext.com/) or [VS Code](https://code.visualstudio.com/). This is probably the best way to go regardless of platform, as these programs are specifically made for editing code. | |||
?> Not sure which text editor to use? Laurence Bradford wrote [a great introduction](https://learntocodewith.me/programming/basics/text-editors/) to the subject. | |||
### QMK Toolbox | |||
QMK Toolbox is an optional graphical Windows and macOS program that allows you to both program and debug your custom keyboard. You will likely prefer it to easily flash your keyboard and receive the debugging messages that your keyboard will print. | |||
Download the files from the links below: | |||
For Windows: "qmk_toolbox.exe" or "qmk_toolbox_install.exe" (with installer) | |||
QMK Toolbox is an optional graphical program for Windows and macOS that allows you to both program and debug your custom keyboard. You will likely find it invaluable for easily flashing your keyboard and viewing debug messages that it prints. | |||
For Mac: "QMK.Toolbox.app.zip" or "QMK.Toolbox.pkg" (with installer) | |||
[Download the latest release here.](https://github.com/qmk/qmk_toolbox/releases/latest) | |||
* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest) | |||
* [Source Code](https://github.com/qmk/qmk_toolbox/) | |||
* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer) | |||
* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer) | |||
## Environment Setup | |||
## Set Up Your Environment | |||
We've tried to make QMK as easy to setup as possible. You only have to prepare your Linux or Unix environment and let QMK install the rest. | |||
We've tried to make QMK as easy to set up as possible. You only have to prepare your Linux or Unix environment, then let QMK install the rest. | |||
?> If you haven't worked with the Linux/Unix command line before there are a few basic concepts and commands you should learn. These resources will teach you enough to work with QMK:<br> | |||
?> If you haven't worked with the Linux/Unix command line before, there are a few basic concepts and commands you should learn. These resources will teach you enough to be able to work with QMK:<br> | |||
[Must Know Linux Commands](https://www.guru99.com/must-know-linux-commands.html)<br> | |||
[Some Basic Unix Commands](https://www.tjhsst.edu/~dhyatt/superap/unixcmd.html) | |||
### Windows | |||
You will need to install msys2 and git. | |||
You will need to install MSYS2 and Git. | |||
* Follow the installation instructions on the msys2 homepage: http://www.msys2.org | |||
* Close any open msys2 terminals, and open a new terminal | |||
* Install git by running this command: `pacman -S git` | |||
* Follow the installation instructions on the [MSYS2 homepage](http://www.msys2.org). | |||
* Close any open MSYS2 terminals and open a new MSYS2 MinGW 64-bit terminal. | |||
* Install Git by running this command: `pacman -S git`. | |||
### macOS | |||
You will need to install homebrew. Follow the instructions on the homebrew homepage: https://brew.sh | |||
You will need to install Homebrew. Follow the instructions on the [Homebrew homepage](https://brew.sh). | |||
After homebrew is installed continue with "Download QMK", following step "Setup QMK" runs a script that will install other packages. | |||
After Homebrew is installed, continue with _Set Up QMK_. In that step you will run a script that will install other packages. | |||
### Linux | |||
You will need to install git. It's extremely likely you already have it, but if not one of the following commands should install it: | |||
You will need to install Git. It's very likely that you already have it, but if not, one of the following commands should install it: | |||
* Debian/Ubuntu/Devuan: `apt-get install git` | |||
* Fedora/Redhat/Centos: `yum install git` | |||
* Debian / Ubuntu / Devuan: `apt-get install git` | |||
* Fedora / Red Hat / CentOS: `yum install git` | |||
* Arch: `pacman -S git` | |||
## Download QMK | |||
?> Docker is also an option on all platforms. [Click here for details.](getting_started_build_tools.md#docker) | |||
Once you have setup your Linux/Unix environment you are ready to download QMK. We will do this by using git to "clone" the QMK repository. Open a Terminal or MSYS2 Console window and leave it open for the remainder of this guide. Inside that window run these two commands: | |||
## Set Up QMK | |||
Once you have set up your Linux/Unix environment, you are ready to download QMK. We will do this by using Git to "clone" the QMK repository. Open a Terminal or MSYS2 MinGW window and leave it open for the remainder of this guide. Inside that window run these two commands: | |||
git clone https://github.com/qmk/qmk_firmware.git | |||
cd qmk_firmware | |||
?> If you already know [how to use GitHub](getting_started_github.md) we recommend you create and clone your own fork instead. If you don't know what that means you can safely ignore this message. | |||
## Setup QMK | |||
?> If you already know [how to use GitHub](getting_started_github.md), we recommend that you create and clone your own fork instead. If you don't know what that means, you can safely ignore this message. | |||
QMK comes with a script to help you setup the rest of what you'll need. You should run it now by typing in this command: | |||
QMK comes with a script to help you set up the rest of what you'll need. You should run it now by typing in this command: | |||
./util/qmk_install.sh | |||
util/qmk_install.sh | |||
## Test Your Build Environment | |||
Now that your QMK build environment is setup you can build a firmware for your keyboard. Start by trying to build the default layout for your keyboard. You should be able to do that with a command in this format: | |||
Now that your QMK build environment is set up, you can build a firmware for your keyboard. Start by trying to build the keyboard's default keymap. You should be able to do that with a command in this format: | |||
make <keyboard>:default | |||
For example, to build a firmware for a Clueboard 66% use: | |||
For example, to build a firmware for a Clueboard 66% you would use: | |||
make clueboard/66/rev3:default | |||
When it is done you should have a lot of output that ends similar to this: | |||
``` | |||
Linking: .build/clueboard_66_rev2_default.elf [OK] | |||
Creating load file for flashing: .build/clueboard_66_rev2_default.hex [OK] | |||
Copying clueboard_66_rev2_default.hex to qmk_firmware folder [OK] | |||
Checking file size of clueboard_66_rev2_default.hex [OK] | |||
* File size is fine - 25174/28672 | |||
Linking: .build/clueboard_66_rev3_default.elf [OK] | |||
Creating load file for flashing: .build/clueboard_66_rev3_default.hex [OK] | |||
Copying clueboard_66_rev3_default.hex to qmk_firmware folder [OK] | |||
Checking file size of clueboard_66_rev3_default.hex [OK] | |||
* The firmware size is fine - 26356/28672 (2316 bytes free) | |||
``` | |||
## Creating Your Layout | |||
# Creating Your Keymap | |||
Now you are ready to create your own personal layout. Move on to [Building Your First Firmware](newbs_building_firmware.md) for that. | |||
You are now ready to create your own personal keymap! Move on to [Building Your First Firmware](newbs_building_firmware.md) for that. |
@ -0,0 +1,195 @@ | |||
# Supporting Your Keyboard in QMK Configurator | |||
This page covers how to properly support keyboards in the [QMK Configurator](https://config.qmk.fm/). | |||
## How the Configurator Understands Keyboards | |||
To understand how the Configurator understands keyboards, first one must understand layout macros. For this exercise, we're going to imagine a 17-key numpad PCB, which we're going to call `numpad`. | |||
``` | |||
┌───┬───┬───┬───┐ | |||
│NLk│ / │ * │ - │ | |||
├───┼───┼───┼───┤ | |||
│7 │8 │9 │ + │ | |||
├───┼───┼───┤ │ | |||
│4 │5 │6 │ │ | |||
├───┼───┼───┼───┤ | |||
│1 │2 │3 │Ent│ | |||
├───┴───┼───┤ │ | |||
│0 │ . │ │ | |||
└───────┴───┴───┘ | |||
``` | |||
?> For more on layout macros, see [Understanding QMK: Matrix Scanning](understanding_qmk.md?id=matrix-scanning) and [Understanding QMK: Matrix to Physical Layout Map](understanding_qmk.md?id=matrix-to-physical-layout-map). | |||
The Configurator's API reads the keyboard's `.h` file from `qmk_firmware/keyboards/<keyboard>/<keyboard>.h`. For our numpad, this file would be `qmk_firmware/keyboards/numpad/numpad.h`: | |||
```c | |||
#pragma once | |||
#define LAYOUT( \ | |||
k00, k01, k02, k03, \ | |||
k10, k11, k12, k13, \ | |||
k20, k21, k22, \ | |||
k30, k31, k32, k33, \ | |||
k40, k42 \ | |||
) { \ | |||
{ k00, k01, k02, k03 }, \ | |||
{ k10, k11, k12, k13 }, \ | |||
{ k20, k21, k22, KC_NO }, \ | |||
{ k30, k31, k32, k33 }, \ | |||
{ k40, KC_NO, k42, KC_NO } \ | |||
} | |||
``` | |||
QMK uses `KC_NO` to designate places in the switch matrix where there is no switch. Sometimes, `XXX`, `___` or `____` are used as shorthand to make this section easier to read if it needs to be debugged. This is usually defined near the beginning of the `.h` file: | |||
```c | |||
#pragma once | |||
#define XXX KC_NO | |||
#define LAYOUT( \ | |||
k00, k01, k02, k03, \ | |||
k10, k11, k12, k13, \ | |||
k20, k21, k22, \ | |||
k30, k31, k32, k33, \ | |||
k40, k42 \ | |||
) { \ | |||
{ k00, k01, k02, k03 }, \ | |||
{ k10, k11, k12, k13 }, \ | |||
{ k20, k21, k22, XXX }, \ | |||
{ k30, k31, k32, k33 }, \ | |||
{ k40, XXX, k42, XXX } \ | |||
} | |||
``` | |||
!> This usage differs from that of keymap macros, which almost always use `XXXXXXX` (seven capital X's) for `KC_NO` and `_______` (seven underscores) for `KC_TRNS`. | |||
!> To prevent user confusion, using `KC_NO` is preferred. | |||
The layout macro tells the Configurator that our keyboard has 17 keys, arranged in five rows of four columns each. Our switch positions are named `k<row><column>`, counting from 0. The names themselves actually don't matter, as long as they match between the top section, which receives the keycodes from the keymap, and the bottom half which designates where each key is in the matrix. | |||
To display our keyboard in a way that resembles the physical keyboard, we need to build a JSON file that tells the Configurator how to tie the physical locations and sizes of our keys to our switch matrix. | |||
## Building the JSON file | |||
To build the JSON file, the easiest way is to build the layout in [Keyboard Layout Editor](http://www.keyboard-layout-editor.com/) ("KLE"), from which we'll feed the Raw Data into a QMK tool that converts this data into a JSON the Configurator will read and use. Since KLE opens by default with a numpad layout, we're just going to remove the Getting Started instructions, and use what's left. | |||
Once the layout is as desired, move to the Raw Data tab in KLE, and copy the contents: | |||
``` | |||
["Num Lock","/","*","-"], | |||
["7\nHome","8\n↑","9\nPgUp",{h:2},"+"], | |||
["4\n←","5","6\n→"], | |||
["1\nEnd","2\n↓","3\nPgDn",{h:2},"Enter"], | |||
[{w:2},"0\nIns",".\nDel"] | |||
``` | |||
To convert this data into our JSON, go to the [QMK KLE-JSON Converter](https://qmk.fm/converter/), paste the Raw Data into the Input field, and click the Convert button. After a moment, our JSON data will appear in the Output field. Copy the contents to a new text document, and name the document `info.json`, saving it in the same folder that contains `numpad.h`. | |||
Use the `keyboard_name` object to set the name of the keyboard. The `bootloader` object is deprecated, so it can be deleted. For instruction purposes, we will put each key's object on its own line. This is only to make the file more human-readable, and does not affect the Configurator's functionality. | |||
```json | |||
{ | |||
"keyboard_name": "Numpad", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"tags": { | |||
"form_factor": "numpad" | |||
}, | |||
"width": 4, | |||
"height": 5, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"label":"Num Lock", "x":0, "y":0}, | |||
{"label":"/", "x":1, "y":0}, | |||
{"label":"*", "x":2, "y":0}, | |||
{"label":"-", "x":3, "y":0}, | |||
{"label":"7", "x":0, "y":1}, | |||
{"label":"8", "x":1, "y":1}, | |||
{"label":"9", "x":2, "y":1}, | |||
{"label":"+", "x":3, "y":1, "h":2}, | |||
{"label":"4", "x":0, "y":2}, | |||
{"label":"5", "x":1, "y":2}, | |||
{"label":"6", "x":2, "y":2}, | |||
{"label":"1", "x":0, "y":3}, | |||
{"label":"2", "x":1, "y":3}, | |||
{"label":"3", "x":2, "y":3}, | |||
{"label":"Enter", "x":3, "y":3, "h":2}, | |||
{"label":"0", "x":0, "y":4, "w":2}, | |||
{"label":".", "x":2, "y":4} | |||
] | |||
} | |||
} | |||
} | |||
``` | |||
The `layouts` object contains the data that represents the physical layout of the keyboard. It has an object `LAYOUT`, which needs to match the name of our layout macro from `numpad.h`. The `LAYOUT` object itself has an object named `layout`, which contains one JSON object for each physical key on our keyboard, formatted as follows: | |||
``` | |||
┌ The name of the key. Not displayed in the Configurator. | |||
│ ┌ The key's X-axis location, in key units from the | |||
│ │ keyboard's left edge. | |||
│ │ ┌ The key's Y-axis location, in key units from | |||
│ │ │ the keyboard's top (rear-facing) edge. | |||
↓ ↓ ↓ | |||
{"label":"Num Lock", "x":0, "y":0}, | |||
``` | |||
Some objects will also have `"w"` and `"h"` keys, which represent a key's width and height, respectively. | |||
?> For more on the `info.json` files, see [QMK Keyboard Guidelines: Keyboard Metadata](hardware_keyboard_guidelines.md?id=keyboard-metadata) | |||
## How the Configurator Programs Keys | |||
The Configurator's API uses the layout macro and the JSON file we've given it to create a visual representation of the keyboard that has each visual object tied to a specific key, in sequence: | |||
key in layout macro | JSON object used | |||
:---: | :---- | |||
k00 | {"label":"Num Lock", "x":0, "y":0} | |||
k01 | {"label":"/", "x":1, "y":0} | |||
k02 | {"label":"*", "x":2, "y":0} | |||
k03 | {"label":"-", "x":3, "y":0} | |||
k10 | {"label":"7", "x":0, "y":1} | |||
k11 | {"label":"8", "x":1, "y":1} | |||
k12 | {"label":"9", "x":2, "y":1} | |||
k13 | {"label":"+", "x":3, "y":1, "h":2} | |||
k20 | {"label":"4", "x":0, "y":2} | |||
k21 | {"label":"5", "x":1, "y":2} | |||
k22 | {"label":"6", "x":2, "y":2} | |||
k30 | {"label":"1", "x":0, "y":3} | |||
k31 | {"label":"2", "x":1, "y":3} | |||
k32 | {"label":"3", "x":2, "y":3} | |||
k33 | {"label":"Enter", "x":3, "y":3, "h":2} | |||
k40 | {"label":"0", "x":0, "y":4, "w":2} | |||
k42 | {"label":".", "x":2, "y":4} | |||
When a user selects the top-left key in the Configurator, and assigns Num Lock to it, the Configurator builds a keymap file with `KC_NLCK` as the first key, and so on as the keymap is built. The `label` keys are not used; they are only for the user's reference in identifying specific keys when debugging the `info.json` file. | |||
## Issues and Hazards | |||
Currently, the Configurator does not support key rotation or non-rectangular key shapes like ISO Enter. Additionally, keys that are vertically-offset from their "row" — the arrow keys on 1800-layouts like the [TKC1800](https://github.com/qmk/qmk_firmware/tree/4ac48a61a66206beaf2fdd5f2939d8bbedd0004c/keyboards/tkc1800/) being a prominent example — confuse the KLE-to-JSON Converter, if not adjusted for by the contributor of the `info.json` file. | |||
### Workarounds | |||
#### Non-rectangular keys | |||
For ISO Enter keys, QMK custom is to display it as a rectangular key, 1.25u wide and 2u high, aligned so its right edge is aligned with the right edge of the alphanumeric key block. | |||
![](https://i.imgur.com/JKngtTw.png) | |||
*A 60% keyboard in standard ISO layout, as rendered by QMK Configurator.* | |||
#### Vertically-offset keys | |||
For vertically-offset keys, place them in KLE as if they were not offset, then edit the Y-values as needed in the converted JSON file | |||
![](https://i.imgur.com/fmDvDzR.png) | |||
*An 1800-layout keyboard as rendered in Keyboard Layout Editor, without the vertical offset applied to the arrow keys.* | |||
![](https://i.imgur.com/8beYMBR.png) | |||
*A Unix diff file, showing the changes needed to vertically-offset the arrow keys in our keyboard's JSON file.* |
@ -1,6 +1,4 @@ | |||
# 1up60hse default keymap | |||
# 1up60hse default keymap generated by QMK Configurator | |||
This is the default keymap provided by [1upkeyboards](https://www.1upkeyboards.com). | |||
This is the keymap used by [QMK Configurator](https://config.qmk.fm/#/1upkeyboards/1up60hse/LAYOUT_60_ansi) as default. | |||
## Notes | |||
- Software reset key is located on `Esc` on the third layer. |
@ -0,0 +1,15 @@ | |||
#pragma once | |||
/* tap dance stuff*/ | |||
#undef TAPPING_TERM | |||
#define TAPPING_TERM 500 | |||
#define TAPPING_TOGGLE 2 | |||
#define EXAMPLESTRING1 "tapdance_1" | |||
#define EXAMPLESTRING2 "tapdance_2" | |||
#define EXAMPLESTRING3 "tapdance_3" | |||
#define EXAMPLESTRING4 "tapdance_4" | |||
#undef RGBLED_NUM | |||
#define RGBLED_NUM 16 |
@ -0,0 +1,215 @@ | |||
/* | |||
tap danc eis turned on in the rules now... | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
#define _EMOJI 0 | |||
#define _TAPLAND 1 | |||
#define _LEDCNTL 2 | |||
enum custom_keycodes { | |||
SHRUG, | |||
DISFACE, | |||
FU, | |||
TFLIP, | |||
TFLIP2, | |||
SAD_EYES, | |||
TPUT, | |||
HAPPYFACE, | |||
HEARTFACE, | |||
CLOUD, | |||
CHANFACE, | |||
CMDCLEAR | |||
}; | |||
//Tap Dance Declarations | |||
enum { | |||
TD_EXAMPLE1 = 0, | |||
TD_EXAMPLE2, | |||
TD_EXAMPLE3, | |||
TD_EXAMPLE4 | |||
}; | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
/* EMOJI Pad | |||
* ,-------------------------------. | |||
* |TFLIP | TFlIP2|DISFACE| FU | | |||
* |------+-------+-------+--------| | |||
* | CLOUD| | | CLEAR | | |||
* |------+-------+-------+--------| | |||
* |SHRUG |DISFACE| HRTFAC| HAPPYF | | |||
* |------+-------+-------+--------| | |||
* | ENTER| |LEDCNTR| tapland| | |||
* `-------------------------------' | |||
*/ | |||
//purple | |||
[_EMOJI] = LAYOUT_ortho_4x4( | |||
TFLIP, TFLIP2, KC_NO, FU , | |||
CLOUD, KC_NO, KC_NO, CMDCLEAR, | |||
SHRUG, DISFACE, HEARTFACE, HAPPYFACE, | |||
KC_ENT, RGB_TOG, MO(_LEDCNTL), MO(_TAPLAND) | |||
), | |||
/* TapLand // | |||
* ,-------------------------------. | |||
* | str1 | str2 | str3 | str4 | | |||
* |------+-------+-------+--------| | |||
* | | | | | | |||
* |------+-------+-------+--------| | |||
* | | | | | | |||
* |------+-------+-------+--------| | |||
* | | | | | | |||
* `-------------------------------' | |||
*/ | |||
//blue | |||
[_TAPLAND] = LAYOUT_ortho_4x4( | |||
TD(TD_EXAMPLE1), TD(TD_EXAMPLE2), TD(TD_EXAMPLE3), TD(TD_EXAMPLE4), | |||
KC_NO, KC_NO, KC_NO, KC_NO, | |||
KC_NO, KC_NO, KC_NO, KC_NO, | |||
KC_NO, KC_NO, KC_NO, KC_NO | |||
), | |||
/* LEDControl Pad | |||
* ,-------------------------------. | |||
* | snake|breathe|rainbow|gradient| | |||
* |------+-------+-------+--------| | |||
* | xmas | Val+ | Sat+ | HUE+ | | |||
* |------+-------+-------+--------| | |||
* |kngrdr| Val- | Sat- | HUE- | | |||
* |------+-------+-------+--------| | |||
* | swirl| PLAIN | | ON/OFF | | |||
* `-------------------------------' | |||
*/ | |||
//blue | |||
[_LEDCNTL] = LAYOUT_ortho_4x4( | |||
RGB_M_SN, RGB_M_B, RGB_M_R, RGB_M_G, | |||
RGB_M_X, RGB_VAI, RGB_SAI, RGB_HUI, | |||
RGB_M_K, RGB_VAD, RGB_SAD, RGB_HUD, | |||
RGB_M_SW, RGB_M_P, KC_NO, RGB_TOG | |||
), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
if (record->event.pressed) { | |||
switch(keycode) { | |||
case CLOUD: // (っ◕‿◕)っ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("0028 3063 25D5 203F 25D5 0029 3063"); | |||
} | |||
return false; | |||
break; | |||
case FU: // t(-_-t) | |||
if(record->event.pressed){ | |||
SEND_STRING("t(-_-t)"); | |||
} | |||
return false; | |||
break; | |||
case HAPPYFACE: // ʘ‿ʘ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("0298 203F 0298"); | |||
} | |||
return false; | |||
break; | |||
case CMDCLEAR: | |||
if (record->event.pressed) { | |||
register_code(KC_LGUI); | |||
tap_code(KC_A); | |||
unregister_code(KC_LGUI); | |||
tap_code(KC_DEL); | |||
} | |||
return false; | |||
break; | |||
case SHRUG: // ¯\_(ツ)_/¯ | |||
if (record->event.pressed) { | |||
send_unicode_hex_string("00AF 005C 005F 0028 30C4 0029 005F 002F 00AF"); | |||
} | |||
return false; | |||
break; | |||
case HEARTFACE: // ♥‿♥ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("2665 203F 2665"); | |||
} | |||
return false; | |||
break; | |||
case DISFACE: // ಠ_ಠ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("0CA0 005F 0CA0"); | |||
} | |||
return false; | |||
break; | |||
case TFLIP: // (╯°□°)╯ ︵ ┻━┻ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("0028 256F 00B0 25A1 00B0 0029 256F 0020 FE35 0020 253B 2501 253B"); | |||
} | |||
return false; | |||
break; | |||
case TFLIP2: // ┻━┻︵ \(°□°)/ ︵ ┻━┻ | |||
if(record->event.pressed){ | |||
send_unicode_hex_string("253B 2501 253B FE35 0020 005C 0028 00B0 25A1 00B0 0029 002F 0020 FE35 0020 253B 2501 253B"); | |||
} | |||
return false; | |||
break; | |||
} | |||
} | |||
return true; | |||
} | |||
/* tap dance time */ | |||
void tdexample1(qk_tap_dance_state_t *state, void *user_data) { | |||
if (state->count >= 2) { | |||
SEND_STRING(EXAMPLESTRING1); | |||
reset_tap_dance (state); | |||
} | |||
} | |||
void tdexample2(qk_tap_dance_state_t *state, void *user_data) { | |||
if (state->count >= 2) { | |||
SEND_STRING(EXAMPLESTRING2); | |||
reset_tap_dance (state); | |||
} | |||
} | |||
void tdexample3(qk_tap_dance_state_t *state, void *user_data) { | |||
if (state->count >= 2) { | |||
SEND_STRING(EXAMPLESTRING3); | |||
reset_tap_dance (state); | |||
} | |||
} | |||
void tdexample4(qk_tap_dance_state_t *state, void *user_data) { | |||
if (state->count >= 2) { | |||
SEND_STRING(EXAMPLESTRING4); | |||
reset_tap_dance (state); | |||
} | |||
} | |||
qk_tap_dance_action_t tap_dance_actions[] = { | |||
[TD_EXAMPLE1] = ACTION_TAP_DANCE_FN(tdexample1), | |||
[TD_EXAMPLE2] = ACTION_TAP_DANCE_FN(tdexample2), | |||
[TD_EXAMPLE3] = ACTION_TAP_DANCE_FN(tdexample3), | |||
[TD_EXAMPLE4] = ACTION_TAP_DANCE_FN(tdexample4) | |||
}; | |||
// Runs just one time when the keyboard initializes. | |||
void matrix_scan_user(void) { | |||
static bool has_ran_yet; | |||
if (!has_ran_yet) { | |||
has_ran_yet = true; | |||
rgblight_setrgb (16, 0, 16); | |||
} | |||
} | |||
uint32_t layer_state_set_user(uint32_t state) { | |||
switch (biton32(state)) { | |||
case _TAPLAND: | |||
rgblight_setrgb(0, 16, 0); //green | |||
break; | |||
case _LEDCNTL: | |||
rgblight_setrgb(0, 0, 16); //blue | |||
break; | |||
case _EMOJI: | |||
rgblight_setrgb (16, 0, 16); //purple | |||
break; | |||
default: // for any other layers, or the default layer | |||
rgblight_setrgb (16, 0, 16); //purple | |||
break; | |||
} | |||
return state; | |||
} |
@ -0,0 +1,10 @@ | |||
# Ridingtraffic's examples | |||
=== | |||
This keymap has many features: | |||
3 layers | |||
Momentary layer switching | |||
16 pixel neopixel | |||
Unicode Enabled | |||
Tap dance enabled | |||
The rgb also updates depending on what layer you are on, and then flips back when done. |
@ -0,0 +1,5 @@ | |||
# turning on tap dance | |||
TAP_DANCE_ENABLE = yes | |||
RGBLIGHT_ENABLE = yes | |||
MOUSEKEY_ENABLE = no | |||
UNICODE_ENABLE = yes |
@ -0,0 +1 @@ | |||
#include "30wer.h" |
@ -0,0 +1,14 @@ | |||
#pragma once | |||
#include "quantum.h" | |||
#define LAYOUT( \ | |||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ | |||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ | |||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b \ | |||
) \ | |||
{ \ | |||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c }, \ | |||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c }, \ | |||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b } \ | |||
} |
@ -0,0 +1,31 @@ | |||
#pragma once | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0x1234 | |||
#define PRODUCT_ID 0x5678 | |||
#define DEVICE_VER 0x0000 | |||
#define MANUFACTURER 8o7wer | |||
#define PRODUCT 30wer | |||
#define DESCRIPTION Gherkin style construction 30% staggered pcb kit | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 3 | |||
#define MATRIX_COLS 13 | |||
/* pcb default pin-out */ | |||
#define MATRIX_ROW_PINS { E6, B4, B5 } | |||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6, D1, D0, D4, C6, D7 } | |||
#define UNUSED_PINS | |||
/* COL2ROW or ROW2COL */ | |||
#define DIODE_DIRECTION COL2ROW | |||
/* key combination for command */ | |||
#define IS_COMMAND() ( \ | |||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||
) | |||
/* prevent stuck modifiers */ | |||
#define PREVENT_STUCK_MODIFIERS |
@ -0,0 +1,51 @@ | |||
{ | |||
"keyboard_name": "30wer", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 13.25, | |||
"height": 3, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [ | |||
{"label":"Tab", "x":0, "y":0}, | |||
{"label":"Q", "x":1, "y":0}, | |||
{"label":"W", "x":2, "y":0}, | |||
{"label":"E", "x":3, "y":0}, | |||
{"label":"R", "x":4, "y":0}, | |||
{"label":"T", "x":5, "y":0}, | |||
{"label":"Y", "x":6, "y":0}, | |||
{"label":"U", "x":7, "y":0}, | |||
{"label":"I", "x":8, "y":0}, | |||
{"label":"O", "x":9, "y":0}, | |||
{"label":"P", "x":10, "y":0}, | |||
{"label":"Bksp", "x":11, "y":0}, | |||
{"label":"Delete", "x":12, "y":0, "w":1.25}, | |||
{"label":"Ctrl", "x":0, "y":1, "w":1.25}, | |||
{"label":"A", "x":1.25, "y":1}, | |||
{"label":"S", "x":2.25, "y":1}, | |||
{"label":"D", "x":3.25, "y":1}, | |||
{"label":"F", "x":4.25, "y":1}, | |||
{"label":"G", "x":5.25, "y":1}, | |||
{"label":"H", "x":6.25, "y":1}, | |||
{"label":"J", "x":7.25, "y":1}, | |||
{"label":"K", "x":8.25, "y":1}, | |||
{"label":"L", "x":9.25, "y":1}, | |||
{"label":":", "x":10.25, "y":1}, | |||
{"label":"\"", "x":11.25, "y":1}, | |||
{"label":"Enter", "x":12.25, "y":1}, | |||
{"label":"Shift", "x":0, "y":2, "w":1.75}, | |||
{"label":"Z", "x":1.75, "y":2}, | |||
{"label":"X", "x":2.75, "y":2}, | |||
{"label":"C", "x":3.75, "y":2}, | |||
{"label":"V", "x":4.75, "y":2}, | |||
{"label":"B", "x":5.75, "y":2}, | |||
{"label":"N", "x":6.75, "y":2}, | |||
{"label":"M", "x":7.75, "y":2}, | |||
{"label":"<", "x":8.75, "y":2}, | |||
{"label":">", "x":9.75, "y":2}, | |||
{"label":"?", "x":10.75, "y":2}, | |||
{"label":"Space", "x":11.75, "y":2, "w":1.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,17 @@ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT( \ | |||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_BSPC, \ | |||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, LT(1, KC_SPC) \ | |||
), | |||
[1] = LAYOUT( \ | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_UP, KC_DEL, \ | |||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ | |||
KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______ \ | |||
), | |||
}; |
@ -0,0 +1,16 @@ | |||
30wer by 8o7wer | |||
=== | |||
![30wer](https://i.imgur.com/ZYbRvY7.png) | |||
Keyboard Maintainer: [Filip Sund](https://github.com/FSund) | |||
Hardware Supported: Pro Micro | |||
Hardware Availability: Group buy | |||
More info in the [group by thread at Keebtalk](https://www.keebtalk.com/t/gb-30wer-by-8o7wer/3618/). | |||
Make example for this keyboard (after setting up your build environment): | |||
make 30wer:default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@ -0,0 +1,60 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader | |||
# This definition is optional, and if your keyboard supports multiple bootloaders of | |||
# different sizes, comment this out, and the correct address will be loaded | |||
# automatically (+60). See bootloader.mk for all options. | |||
BOOTLOADER = caterina | |||
# Build Options | |||
# change to "no" to disable the options, or define them in the Makefile in | |||
# the appropriate keymap folder that will get included automatically | |||
# | |||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = no # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = yes # Console for debug(+400) | |||
COMMAND_ENABLE = no # Commands for debug and configuration | |||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
MIDI_ENABLE = no # MIDI controls | |||
AUDIO_ENABLE = no # Audio output | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. |
@ -0,0 +1,60 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "25.h" | |||
void matrix_init_kb(void) { | |||
// put your keyboard start-up code here | |||
// runs once when the firmware starts up | |||
matrix_init_user(); | |||
} | |||
void matrix_scan_kb(void) { | |||
// put your looping keyboard code here | |||
// runs every cycle (a lot) | |||
matrix_scan_user(); | |||
} | |||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
// put your per-action keyboard code here | |||
// runs for every action, just before processing by the firmware | |||
return process_record_user(keycode, record); | |||
} | |||
void led_set_kb(uint8_t usb_led) { | |||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | |||
led_set_user(usb_led); | |||
} | |||
#ifdef SWAP_HANDS_ENABLE | |||
__attribute__ ((weak)) | |||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | |||
{{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, | |||
{{4, 6}, {3, 6}, {2, 6}, {1, 6}, {0, 6}}, | |||
{{4, 7}, {3, 7}, {2, 7}, {1, 7}, {0, 7}}, | |||
{{4, 8}, {3, 8}, {2, 8}, {1, 8}, {0, 8}}, | |||
{{4, 9}, {3, 9}, {2, 9}, {1, 9}, {0, 9}}, | |||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, | |||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, | |||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, | |||
{{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}}, | |||
{{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}}, | |||
}; | |||
#endif |
@ -0,0 +1,85 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "quantum.h" | |||
#define ___ KC_NO | |||
#ifndef FLIP_HALF | |||
#define LAYOUT_ortho_5x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | |||
L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ | |||
L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ L30, L31, L32, L33, L34 }, \ | |||
{ L40, L41, L42, L43, L44 }, \ | |||
{ R04, R03, R02, R01, R00 }, \ | |||
{ R14, R13, R12, R11, R10 }, \ | |||
{ R24, R23, R22, R21, R20 }, \ | |||
{ R34, R33, R32, R31, R30 }, \ | |||
{ R44, R43, R42, R41, R40 } \ | |||
} | |||
#else | |||
#define LAYOUT_ortho_5x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | |||
L30, L31, L32, L33, L34, R30, R31, R32, R33, R34, \ | |||
L40, L41, L42, L43, L44, R40, R41, R42, R43, R44 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ L30, L31, L32, L33, L34 }, \ | |||
{ L40, L41, L42, L43, L44 }, \ | |||
{ R00, R01, R02, R03, R04 }, \ | |||
{ R10, R11, R12, R13, R14 }, \ | |||
{ R20, R21, R22, R23, R24 }, \ | |||
{ R30, R31, R32, R33, R34 }, \ | |||
{ R40, R41, R42, R43, R44 } \ | |||
} | |||
#endif | |||
#define LAYOUT_ortho_5x5( \ | |||
L00, L01, L02, L03, L04, \ | |||
L10, L11, L12, L13, L14, \ | |||
L20, L21, L22, L23, L24, \ | |||
L30, L31, L32, L33, L34, \ | |||
L40, L41, L42, L43, L44 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ L30, L31, L32, L33, L34 }, \ | |||
{ L40, L41, L42, L43, L44 }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ } \ | |||
} | |||
#define LAYOUT_macro LAYOUT_ortho_5x5 | |||
#define LAYOUT_split LAYOUT_ortho_5x10 | |||
#ifdef USE_I2C | |||
#error "I2C not Supported" | |||
#endif |
@ -0,0 +1,230 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0x0A0C | |||
#define DEVICE_VER 0x0F25 | |||
#define MANUFACTURER di0ib | |||
#define PRODUCT The 5x5 Keyboard | |||
#define DESCRIPTION A split 50 key keyboard | |||
#define USE_SERIAL | |||
/* Select hand configuration */ | |||
#define MASTER_LEFT | |||
//#define MASTER_RIGHT | |||
//#define EE_HANDS | |||
/* key matrix size */ | |||
// Rows are doubled-up | |||
#define MATRIX_ROWS 5*2 | |||
#define MATRIX_COLS 5 | |||
/* | |||
* Keyboard Matrix Assignments | |||
* | |||
* Change this to how you wired your keyboard | |||
* COLS: AVR pins used for columns, left to right | |||
* ROWS: AVR pins used for rows, top to bottom | |||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |||
* | |||
*/ | |||
#define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } | |||
#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 } | |||
#define UNUSED_PINS | |||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ | |||
#define DIODE_DIRECTION COL2ROW | |||
// #define BACKLIGHT_PIN B7 | |||
// #define BACKLIGHT_BREATHING | |||
// #define BACKLIGHT_LEVELS 3 | |||
// #define RGB_DI_PIN E2 | |||
// #ifdef RGB_DI_PIN | |||
// #define RGBLIGHT_ANIMATIONS | |||
// #define RGBLED_NUM 16 | |||
// #define RGBLIGHT_HUE_STEP 8 | |||
// #define RGBLIGHT_SAT_STEP 8 | |||
// #define RGBLIGHT_VAL_STEP 8 | |||
// #endif | |||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |||
#define DEBOUNCING_DELAY 5 | |||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | |||
//#define MATRIX_HAS_GHOST | |||
/* number of backlight levels */ | |||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |||
#define LOCKING_SUPPORT_ENABLE | |||
/* Locking resynchronize hack */ | |||
#define LOCKING_RESYNC_ENABLE | |||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | |||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc). | |||
*/ | |||
// #define GRAVE_ESC_CTRL_OVERRIDE | |||
/* | |||
* Force NKRO | |||
* | |||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | |||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | |||
* makefile for this to work.) | |||
* | |||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | |||
* until the next keyboard reset. | |||
* | |||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is | |||
* fully operational during normal computer usage. | |||
* | |||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | |||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | |||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a | |||
* power-up. | |||
* | |||
*/ | |||
//#define FORCE_NKRO | |||
/* | |||
* Magic Key Options | |||
* | |||
* Magic keys are hotkey commands that allow control over firmware functions of | |||
* the keyboard. They are best used in combination with the HID Listen program, | |||
* found here: https://www.pjrc.com/teensy/hid_listen.html | |||
* | |||
* The options below allow the magic key functionality to be changed. This is | |||
* useful if your keyboard/keypad is missing keys and you want magic key support. | |||
* | |||
*/ | |||
/* key combination for magic key command */ | |||
#define IS_COMMAND() ( \ | |||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||
) | |||
/* control how magic key switches layers */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | |||
/* override magic key keymap */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | |||
//#define MAGIC_KEY_HELP1 H | |||
//#define MAGIC_KEY_HELP2 SLASH | |||
//#define MAGIC_KEY_DEBUG D | |||
//#define MAGIC_KEY_DEBUG_MATRIX X | |||
//#define MAGIC_KEY_DEBUG_KBD K | |||
//#define MAGIC_KEY_DEBUG_MOUSE M | |||
//#define MAGIC_KEY_VERSION V | |||
//#define MAGIC_KEY_STATUS S | |||
//#define MAGIC_KEY_CONSOLE C | |||
//#define MAGIC_KEY_LAYER0_ALT1 ESC | |||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE | |||
//#define MAGIC_KEY_LAYER0 0 | |||
//#define MAGIC_KEY_LAYER1 1 | |||
//#define MAGIC_KEY_LAYER2 2 | |||
//#define MAGIC_KEY_LAYER3 3 | |||
//#define MAGIC_KEY_LAYER4 4 | |||
//#define MAGIC_KEY_LAYER5 5 | |||
//#define MAGIC_KEY_LAYER6 6 | |||
//#define MAGIC_KEY_LAYER7 7 | |||
//#define MAGIC_KEY_LAYER8 8 | |||
//#define MAGIC_KEY_LAYER9 9 | |||
//#define MAGIC_KEY_BOOTLOADER PAUSE | |||
//#define MAGIC_KEY_LOCK CAPS | |||
//#define MAGIC_KEY_EEPROM E | |||
//#define MAGIC_KEY_NKRO N | |||
//#define MAGIC_KEY_SLEEP_LED Z | |||
/* | |||
* Feature disable options | |||
* These options are also useful to firmware size reduction. | |||
*/ | |||
/* disable debug print */ | |||
//#define NO_DEBUG | |||
/* disable print */ | |||
//#define NO_PRINT | |||
/* disable action features */ | |||
//#define NO_ACTION_LAYER | |||
//#define NO_ACTION_TAPPING | |||
//#define NO_ACTION_ONESHOT | |||
//#define NO_ACTION_MACRO | |||
//#define NO_ACTION_FUNCTION | |||
/* | |||
* MIDI options | |||
*/ | |||
/* Prevent use of disabled MIDI features in the keymap */ | |||
//#define MIDI_ENABLE_STRICT 1 | |||
/* enable basic MIDI features: | |||
- MIDI notes can be sent when in Music mode is on | |||
*/ | |||
//#define MIDI_BASIC | |||
/* enable advanced MIDI features: | |||
- MIDI notes can be added to the keymap | |||
- Octave shift and transpose | |||
- Virtual sustain, portamento, and modulation wheel | |||
- etc. | |||
*/ | |||
//#define MIDI_ADVANCED | |||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | |||
//#define MIDI_TONE_KEYCODE_OCTAVES 1 | |||
/* | |||
* HD44780 LCD Display Configuration | |||
*/ | |||
/* | |||
#define LCD_LINES 2 //< number of visible lines of the display | |||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | |||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | |||
#if LCD_IO_MODE | |||
#define LCD_PORT PORTB //< port for the LCD lines | |||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | |||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | |||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | |||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | |||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | |||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | |||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | |||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | |||
#define LCD_RS_PORT LCD_PORT //< port for RS line | |||
#define LCD_RS_PIN 3 //< pin for RS line | |||
#define LCD_RW_PORT LCD_PORT //< port for RW line | |||
#define LCD_RW_PIN 2 //< pin for RW line | |||
#define LCD_E_PORT LCD_PORT //< port for Enable line | |||
#define LCD_E_PIN 1 //< pin for Enable line | |||
#endif | |||
*/ |
@ -0,0 +1,29 @@ | |||
{ | |||
"keyboard_name": "foobar", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 6, | |||
"height": 2, | |||
"layouts": { | |||
"LAYOUT_macro": { | |||
"key_count": 15, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, | |||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, | |||
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, | |||
{"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4} | |||
] | |||
}, | |||
"LAYOUT_split": { | |||
"key_count": 30, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, | |||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, | |||
{"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, | |||
{"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, {"x":9, "y":4} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1,87 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
// Each layer gets a name for readability, which is then used in the keymap matrix below. | |||
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | |||
// Layer names don't all need to be of the same length, obviously, and you can also skip them | |||
// entirely and just use numbers. | |||
#define _QWERTY 0 | |||
#define _LOWER 1 | |||
enum custom_keycodes { | |||
QWERTY = SAFE_RANGE, | |||
LOWER, | |||
}; | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
/* Qwerty | |||
* ,---------------------------------------------------------------------. | |||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | |||
* |------+------+------+------+------+------+------+------+------+------| | |||
* | Q | W | E | R | T | Y | U | I | O | P | | |||
* |------+------+------+------+-------------+------+------+------+------| | |||
* | A | S | D | F | G | H | J | K | L | Bksp | | |||
* |------+------+------+------+------|------+------+------+------+------| | |||
* | Z | X | C | V | B | N | M | , | . |Enter | | |||
* |------+------+------+------+------+------+------+------+------+------| | |||
* | Ctrl | GUI | Alt |Lower |Space | Shift| Left | Down | Up |Right | | |||
* `---------------------------------------------------------------------' | |||
*/ | |||
[_QWERTY] = LAYOUT_split( | |||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ | |||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ | |||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_BSPC, \ | |||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT, \ | |||
KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ | |||
), | |||
/* Lower | |||
* ,---------------------------------------------------------------------. | |||
* | F1 | F2 | F3 | F4 | F5 | F6 | ` | / | _ | + | | |||
* |------+------+------+------+------|------+------+------+------+------| | |||
* | F7 | F8 | F9 | F10 | F11 | F12 | ~ | [ | ] | \ | | |||
* |------+------+------+------+-------------+------+------+------+------| | |||
* | Esc | | | | | | | ; | " | Del | | |||
* |------+------+------+------+------|------+------+------+------+------| | |||
* | Tab | | | | | | | | | | | |||
* |------+------+------+------+------+------+------+------+------+------| | |||
* | | | | | | | Home | PgDn | PgUp | End | | |||
* `---------------------------------------------------------------------' | |||
*/ | |||
[_LOWER] = LAYOUT_split( \ | |||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_GRV, KC_SLSH, KC_UNDS, KC_PLUS, \ | |||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TILD, KC_LBRC, KC_RBRC, KC_PIPE, \ | |||
KC_ESC, _______, _______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, KC_DEL, \ | |||
KC_TAB, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | |||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ | |||
), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
} |
@ -0,0 +1 @@ | |||
# The default split keymap for 25 |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1 @@ | |||
# The default macro keymap for 25 |
@ -0,0 +1,18 @@ | |||
# 25 | |||
![25](https://2.bp.blogspot.com/-lBK_ZlB3a9Q/WcAM0B_vwdI/AAAAAAACDgs/qnI9YB53pzck4Bw0v5QRvypDMs80CxWVQCLcBGAs/s640/IMG_0695.JPG) | |||
=== | |||
Split 50 key keyboard - it is the largest keybad that fits within the 100mm x 100mm PCB size. Can be used together as a split keyboard or as a single 25 key macropad. | |||
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/25) | |||
Keyboard Maintainer: QMK Community | |||
Hardware Supported: 25 PCB | |||
Hardware Availability: [25 project on 40% Keyboards](http://www.40percent.club/2017/09/25.html) | |||
Make example for this keyboard (after setting up your build environment): | |||
make 40percentclub/25:default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@ -0,0 +1,85 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader selection | |||
# Teensy halfkay | |||
# Pro Micro caterina | |||
# Atmel DFU atmel-dfu | |||
# LUFA DFU lufa-dfu | |||
# QMK DFU qmk-dfu | |||
# atmega32a bootloadHID | |||
BOOTLOADER = caterina | |||
# If you don't know the bootloader type, then you can specify the | |||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = no # Console for debug(+400) | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = yes # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | |||
# Enable generic behavior for split boards | |||
SPLIT_KEYBOARD = yes | |||
LAYOUTS = ortho_5x5 ortho_5x10 |
@ -0,0 +1,80 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader selection | |||
# Teensy halfkay | |||
# Pro Micro caterina | |||
# Atmel DFU atmel-dfu | |||
# LUFA DFU lufa-dfu | |||
# QMK DFU qmk-dfu | |||
# atmega32a bootloadHID | |||
BOOTLOADER = caterina | |||
# If you don't know the bootloader type, then you can specify the | |||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = yes # Console for debug(+400) | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = no # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | |||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | |||
#FIXME: Community keymap build are currently failing due to missing functionality | |||
#LAYOUTS = ortho_4x4 ortho_4x8 ortho_4x12 ortho_4x16 |
@ -0,0 +1,81 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader selection | |||
# Teensy halfkay | |||
# Pro Micro caterina | |||
# Atmel DFU atmel-dfu | |||
# LUFA DFU lufa-dfu | |||
# QMK DFU qmk-dfu | |||
# atmega32a bootloadHID | |||
BOOTLOADER = caterina | |||
# If you don't know the bootloader type, then you can specify the | |||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = yes # Console for debug(+400) | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = no # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | |||
#FIXME: Community keymap build are currently failing due to missing functionality | |||
#LAYOUTS = ortho_5x5 ortho_5x10 ortho_5x15 |
@ -0,0 +1,53 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "6lit.h" | |||
void matrix_init_kb(void) { | |||
// put your keyboard start-up code here | |||
// runs once when the firmware starts up | |||
matrix_init_user(); | |||
} | |||
void matrix_scan_kb(void) { | |||
// put your looping keyboard code here | |||
// runs every cycle (a lot) | |||
matrix_scan_user(); | |||
} | |||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
// put your per-action keyboard code here | |||
// runs for every action, just before processing by the firmware | |||
return process_record_user(keycode, record); | |||
} | |||
void led_set_kb(uint8_t usb_led) { | |||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | |||
led_set_user(usb_led); | |||
} | |||
#ifdef SWAP_HANDS_ENABLE | |||
__attribute__ ((weak)) | |||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | |||
{{2, 2}, {1, 2}, {0, 2}}, | |||
{{2, 3}, {1, 3}, {0, 3}}, | |||
{{0, 0}, {1, 0}, {2, 0}}, | |||
{{0, 1}, {1, 1}, {2, 1}}, | |||
}; | |||
#endif |
@ -0,0 +1,58 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "quantum.h" | |||
#define ___ KC_NO | |||
#ifndef FLIP_HALF | |||
#define LAYOUT_ortho_2x6( \ | |||
L00, L01, L02, R00, R01, R02, \ | |||
L10, L11, L12, R10, R11, R12 \ | |||
) { \ | |||
{ L00, L01, L02 }, \ | |||
{ L10, L11, L12 }, \ | |||
{ R02, R01, R00 }, \ | |||
{ R12, R11, R10 }, \ | |||
} | |||
#else | |||
#define LAYOUT_ortho_2x6( \ | |||
L00, L01, L02, R00, R01, R02, \ | |||
L10, L11, L12, R10, R11, R12 \ | |||
) { \ | |||
{ L00, L01, L02 }, \ | |||
{ L10, L11, L12 }, \ | |||
{ R00, R01, R02 }, \ | |||
{ R10, R11, R12 }, \ | |||
} | |||
#endif | |||
#define LAYOUT_ortho_2x3( \ | |||
L00, L01, L02, \ | |||
L10, L11, L12 \ | |||
) { \ | |||
{ L00, L01, L02 }, \ | |||
{ L10, L11, L12 }, \ | |||
{ ___, ___, ___ }, \ | |||
{ ___, ___, ___ }, \ | |||
} | |||
#define LAYOUT_macro LAYOUT_ortho_2x3 | |||
#define LAYOUT_split LAYOUT_ortho_2x6 | |||
#ifdef USE_I2C | |||
#error "I2C not Supported" | |||
#endif |
@ -0,0 +1,230 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0x0A0C | |||
#define DEVICE_VER 0x0F61 | |||
#define MANUFACTURER di0ib | |||
#define PRODUCT The 6lit Macropad | |||
#define DESCRIPTION A split 12 key Macropad | |||
#define USE_SERIAL | |||
/* Select hand configuration */ | |||
#define MASTER_LEFT | |||
//#define MASTER_RIGHT | |||
//#define EE_HANDS | |||
/* key matrix size */ | |||
// Rows are doubled-up | |||
#define MATRIX_ROWS 2*2 | |||
#define MATRIX_COLS 3 | |||
/* | |||
* Keyboard Matrix Assignments | |||
* | |||
* Change this to how you wired your keyboard | |||
* COLS: AVR pins used for columns, left to right | |||
* ROWS: AVR pins used for rows, top to bottom | |||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |||
* | |||
*/ | |||
#define MATRIX_ROW_PINS { D7, E6 } | |||
#define MATRIX_COL_PINS { F6, F7, B1 } | |||
#define UNUSED_PINS | |||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ | |||
#define DIODE_DIRECTION COL2ROW | |||
// #define BACKLIGHT_PIN B7 | |||
// #define BACKLIGHT_BREATHING | |||
// #define BACKLIGHT_LEVELS 3 | |||
// #define RGB_DI_PIN E2 | |||
// #ifdef RGB_DI_PIN | |||
// #define RGBLIGHT_ANIMATIONS | |||
// #define RGBLED_NUM 16 | |||
// #define RGBLIGHT_HUE_STEP 8 | |||
// #define RGBLIGHT_SAT_STEP 8 | |||
// #define RGBLIGHT_VAL_STEP 8 | |||
// #endif | |||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |||
#define DEBOUNCING_DELAY 5 | |||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | |||
//#define MATRIX_HAS_GHOST | |||
/* number of backlight levels */ | |||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |||
#define LOCKING_SUPPORT_ENABLE | |||
/* Locking resynchronize hack */ | |||
#define LOCKING_RESYNC_ENABLE | |||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | |||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc). | |||
*/ | |||
// #define GRAVE_ESC_CTRL_OVERRIDE | |||
/* | |||
* Force NKRO | |||
* | |||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | |||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | |||
* makefile for this to work.) | |||
* | |||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | |||
* until the next keyboard reset. | |||
* | |||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is | |||
* fully operational during normal computer usage. | |||
* | |||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | |||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | |||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a | |||
* power-up. | |||
* | |||
*/ | |||
//#define FORCE_NKRO | |||
/* | |||
* Magic Key Options | |||
* | |||
* Magic keys are hotkey commands that allow control over firmware functions of | |||
* the keyboard. They are best used in combination with the HID Listen program, | |||
* found here: https://www.pjrc.com/teensy/hid_listen.html | |||
* | |||
* The options below allow the magic key functionality to be changed. This is | |||
* useful if your keyboard/keypad is missing keys and you want magic key support. | |||
* | |||
*/ | |||
/* key combination for magic key command */ | |||
#define IS_COMMAND() ( \ | |||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||
) | |||
/* control how magic key switches layers */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | |||
/* override magic key keymap */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | |||
//#define MAGIC_KEY_HELP1 H | |||
//#define MAGIC_KEY_HELP2 SLASH | |||
//#define MAGIC_KEY_DEBUG D | |||
//#define MAGIC_KEY_DEBUG_MATRIX X | |||
//#define MAGIC_KEY_DEBUG_KBD K | |||
//#define MAGIC_KEY_DEBUG_MOUSE M | |||
//#define MAGIC_KEY_VERSION V | |||
//#define MAGIC_KEY_STATUS S | |||
//#define MAGIC_KEY_CONSOLE C | |||
//#define MAGIC_KEY_LAYER0_ALT1 ESC | |||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE | |||
//#define MAGIC_KEY_LAYER0 0 | |||
//#define MAGIC_KEY_LAYER1 1 | |||
//#define MAGIC_KEY_LAYER2 2 | |||
//#define MAGIC_KEY_LAYER3 3 | |||
//#define MAGIC_KEY_LAYER4 4 | |||
//#define MAGIC_KEY_LAYER5 5 | |||
//#define MAGIC_KEY_LAYER6 6 | |||
//#define MAGIC_KEY_LAYER7 7 | |||
//#define MAGIC_KEY_LAYER8 8 | |||
//#define MAGIC_KEY_LAYER9 9 | |||
//#define MAGIC_KEY_BOOTLOADER PAUSE | |||
//#define MAGIC_KEY_LOCK CAPS | |||
//#define MAGIC_KEY_EEPROM E | |||
//#define MAGIC_KEY_NKRO N | |||
//#define MAGIC_KEY_SLEEP_LED Z | |||
/* | |||
* Feature disable options | |||
* These options are also useful to firmware size reduction. | |||
*/ | |||
/* disable debug print */ | |||
//#define NO_DEBUG | |||
/* disable print */ | |||
//#define NO_PRINT | |||
/* disable action features */ | |||
//#define NO_ACTION_LAYER | |||
//#define NO_ACTION_TAPPING | |||
//#define NO_ACTION_ONESHOT | |||
//#define NO_ACTION_MACRO | |||
//#define NO_ACTION_FUNCTION | |||
/* | |||
* MIDI options | |||
*/ | |||
/* Prevent use of disabled MIDI features in the keymap */ | |||
//#define MIDI_ENABLE_STRICT 1 | |||
/* enable basic MIDI features: | |||
- MIDI notes can be sent when in Music mode is on | |||
*/ | |||
//#define MIDI_BASIC | |||
/* enable advanced MIDI features: | |||
- MIDI notes can be added to the keymap | |||
- Octave shift and transpose | |||
- Virtual sustain, portamento, and modulation wheel | |||
- etc. | |||
*/ | |||
//#define MIDI_ADVANCED | |||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | |||
//#define MIDI_TONE_KEYCODE_OCTAVES 1 | |||
/* | |||
* HD44780 LCD Display Configuration | |||
*/ | |||
/* | |||
#define LCD_LINES 2 //< number of visible lines of the display | |||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | |||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | |||
#if LCD_IO_MODE | |||
#define LCD_PORT PORTB //< port for the LCD lines | |||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | |||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | |||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | |||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | |||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | |||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | |||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | |||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | |||
#define LCD_RS_PORT LCD_PORT //< port for RS line | |||
#define LCD_RS_PIN 3 //< pin for RS line | |||
#define LCD_RW_PORT LCD_PORT //< port for RW line | |||
#define LCD_RW_PIN 2 //< pin for RW line | |||
#define LCD_E_PORT LCD_PORT //< port for Enable line | |||
#define LCD_E_PIN 1 //< pin for Enable line | |||
#endif | |||
*/ |
@ -0,0 +1,23 @@ | |||
{ | |||
"keyboard_name": "6lit", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 6, | |||
"height": 2, | |||
"layouts": { | |||
"LAYOUT_macro": { | |||
"key_count": 6, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1} | |||
] | |||
}, | |||
"LAYOUT_split": { | |||
"key_count": 12, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1,39 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_split( /* Base */ | |||
KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, \ | |||
KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24 \ | |||
), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
} |
@ -0,0 +1 @@ | |||
# The default split keymap for 6lit |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1,39 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_macro( /* Base */ | |||
KC_F19, KC_F20, KC_F21, \ | |||
KC_F22, KC_F23, KC_F24 \ | |||
), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
} |
@ -0,0 +1 @@ | |||
# The default single board macro keymap for 6lit |
@ -0,0 +1,18 @@ | |||
# 6lit | |||
![6lit](https://1.bp.blogspot.com/-Pa8RgYZ0hy8/Wbmr4bjuV0I/AAAAAAACDbI/WLKQMDlcDVAVf1lAIRMN51usR1XcCCVNgCLcBGAs/s1600/a.JPG) | |||
=== | |||
6 key macropad that fits within the 100mm x 100mm PCB size. Can be used singly as a regular 6 key macropad as well. | |||
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/6lit) | |||
Keyboard Maintainer: QMK Community | |||
Hardware Supported: 6lit PCB | |||
Hardware Availability: [6lit project on 40% Keyboards](http://www.40percent.club/2017/09/6lit.html) | |||
Make example for this keyboard (after setting up your build environment): | |||
make 40percentclub/6lit:default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@ -0,0 +1,83 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader selection | |||
# Teensy halfkay | |||
# Pro Micro caterina | |||
# Atmel DFU atmel-dfu | |||
# LUFA DFU lufa-dfu | |||
# QMK DFU qmk-dfu | |||
# atmega32a bootloadHID | |||
BOOTLOADER = caterina | |||
# If you don't know the bootloader type, then you can specify the | |||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = no # Console for debug(+400) | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = yes # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | |||
# Enable generic behavior for split boards | |||
SPLIT_KEYBOARD = yes |
@ -0,0 +1,230 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0x0A0C | |||
#define DEVICE_VER 0x0F00 | |||
#define MANUFACTURER di0ib | |||
#define PRODUCT The foobar Keyboard | |||
#define DESCRIPTION A split 30 key keyboard | |||
#define USE_SERIAL | |||
/* Select hand configuration */ | |||
#define MASTER_LEFT | |||
//#define MASTER_RIGHT | |||
//#define EE_HANDS | |||
/* key matrix size */ | |||
// Rows are doubled-up | |||
#define MATRIX_ROWS 3*2 | |||
#define MATRIX_COLS 5 | |||
/* | |||
* Keyboard Matrix Assignments | |||
* | |||
* Change this to how you wired your keyboard | |||
* COLS: AVR pins used for columns, left to right | |||
* ROWS: AVR pins used for rows, top to bottom | |||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |||
* | |||
*/ | |||
#define MATRIX_ROW_PINS { D7, E6, B4 } | |||
#define MATRIX_COL_PINS { F6, F7, B1, B3, B2 } | |||
#define UNUSED_PINS | |||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ | |||
#define DIODE_DIRECTION COL2ROW | |||
// #define BACKLIGHT_PIN B7 | |||
// #define BACKLIGHT_BREATHING | |||
// #define BACKLIGHT_LEVELS 3 | |||
// #define RGB_DI_PIN E2 | |||
// #ifdef RGB_DI_PIN | |||
// #define RGBLIGHT_ANIMATIONS | |||
// #define RGBLED_NUM 16 | |||
// #define RGBLIGHT_HUE_STEP 8 | |||
// #define RGBLIGHT_SAT_STEP 8 | |||
// #define RGBLIGHT_VAL_STEP 8 | |||
// #endif | |||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |||
#define DEBOUNCING_DELAY 5 | |||
/* define if matrix has ghost (lacks anti-ghosting diodes) */ | |||
//#define MATRIX_HAS_GHOST | |||
/* number of backlight levels */ | |||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | |||
#define LOCKING_SUPPORT_ENABLE | |||
/* Locking resynchronize hack */ | |||
#define LOCKING_RESYNC_ENABLE | |||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. | |||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc). | |||
*/ | |||
// #define GRAVE_ESC_CTRL_OVERRIDE | |||
/* | |||
* Force NKRO | |||
* | |||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved | |||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the | |||
* makefile for this to work.) | |||
* | |||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) | |||
* until the next keyboard reset. | |||
* | |||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is | |||
* fully operational during normal computer usage. | |||
* | |||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) | |||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by | |||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a | |||
* power-up. | |||
* | |||
*/ | |||
//#define FORCE_NKRO | |||
/* | |||
* Magic Key Options | |||
* | |||
* Magic keys are hotkey commands that allow control over firmware functions of | |||
* the keyboard. They are best used in combination with the HID Listen program, | |||
* found here: https://www.pjrc.com/teensy/hid_listen.html | |||
* | |||
* The options below allow the magic key functionality to be changed. This is | |||
* useful if your keyboard/keypad is missing keys and you want magic key support. | |||
* | |||
*/ | |||
/* key combination for magic key command */ | |||
#define IS_COMMAND() ( \ | |||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | |||
) | |||
/* control how magic key switches layers */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false | |||
/* override magic key keymap */ | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS | |||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM | |||
//#define MAGIC_KEY_HELP1 H | |||
//#define MAGIC_KEY_HELP2 SLASH | |||
//#define MAGIC_KEY_DEBUG D | |||
//#define MAGIC_KEY_DEBUG_MATRIX X | |||
//#define MAGIC_KEY_DEBUG_KBD K | |||
//#define MAGIC_KEY_DEBUG_MOUSE M | |||
//#define MAGIC_KEY_VERSION V | |||
//#define MAGIC_KEY_STATUS S | |||
//#define MAGIC_KEY_CONSOLE C | |||
//#define MAGIC_KEY_LAYER0_ALT1 ESC | |||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE | |||
//#define MAGIC_KEY_LAYER0 0 | |||
//#define MAGIC_KEY_LAYER1 1 | |||
//#define MAGIC_KEY_LAYER2 2 | |||
//#define MAGIC_KEY_LAYER3 3 | |||
//#define MAGIC_KEY_LAYER4 4 | |||
//#define MAGIC_KEY_LAYER5 5 | |||
//#define MAGIC_KEY_LAYER6 6 | |||
//#define MAGIC_KEY_LAYER7 7 | |||
//#define MAGIC_KEY_LAYER8 8 | |||
//#define MAGIC_KEY_LAYER9 9 | |||
//#define MAGIC_KEY_BOOTLOADER PAUSE | |||
//#define MAGIC_KEY_LOCK CAPS | |||
//#define MAGIC_KEY_EEPROM E | |||
//#define MAGIC_KEY_NKRO N | |||
//#define MAGIC_KEY_SLEEP_LED Z | |||
/* | |||
* Feature disable options | |||
* These options are also useful to firmware size reduction. | |||
*/ | |||
/* disable debug print */ | |||
//#define NO_DEBUG | |||
/* disable print */ | |||
//#define NO_PRINT | |||
/* disable action features */ | |||
//#define NO_ACTION_LAYER | |||
//#define NO_ACTION_TAPPING | |||
//#define NO_ACTION_ONESHOT | |||
//#define NO_ACTION_MACRO | |||
//#define NO_ACTION_FUNCTION | |||
/* | |||
* MIDI options | |||
*/ | |||
/* Prevent use of disabled MIDI features in the keymap */ | |||
//#define MIDI_ENABLE_STRICT 1 | |||
/* enable basic MIDI features: | |||
- MIDI notes can be sent when in Music mode is on | |||
*/ | |||
//#define MIDI_BASIC | |||
/* enable advanced MIDI features: | |||
- MIDI notes can be added to the keymap | |||
- Octave shift and transpose | |||
- Virtual sustain, portamento, and modulation wheel | |||
- etc. | |||
*/ | |||
//#define MIDI_ADVANCED | |||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ | |||
//#define MIDI_TONE_KEYCODE_OCTAVES 1 | |||
/* | |||
* HD44780 LCD Display Configuration | |||
*/ | |||
/* | |||
#define LCD_LINES 2 //< number of visible lines of the display | |||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display | |||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode | |||
#if LCD_IO_MODE | |||
#define LCD_PORT PORTB //< port for the LCD lines | |||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 | |||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 | |||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 | |||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 | |||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 | |||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 | |||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 | |||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 | |||
#define LCD_RS_PORT LCD_PORT //< port for RS line | |||
#define LCD_RS_PIN 3 //< pin for RS line | |||
#define LCD_RW_PORT LCD_PORT //< port for RW line | |||
#define LCD_RW_PIN 2 //< pin for RW line | |||
#define LCD_E_PORT LCD_PORT //< port for Enable line | |||
#define LCD_E_PIN 1 //< pin for Enable line | |||
#endif | |||
*/ |
@ -0,0 +1,55 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include "foobar.h" | |||
void matrix_init_kb(void) { | |||
// put your keyboard start-up code here | |||
// runs once when the firmware starts up | |||
matrix_init_user(); | |||
} | |||
void matrix_scan_kb(void) { | |||
// put your looping keyboard code here | |||
// runs every cycle (a lot) | |||
matrix_scan_user(); | |||
} | |||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) { | |||
// put your per-action keyboard code here | |||
// runs for every action, just before processing by the firmware | |||
return process_record_user(keycode, record); | |||
} | |||
void led_set_kb(uint8_t usb_led) { | |||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | |||
led_set_user(usb_led); | |||
} | |||
#ifdef SWAP_HANDS_ENABLE | |||
__attribute__ ((weak)) | |||
const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { | |||
{{4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, | |||
{{4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, | |||
{{4, 5}, {3, 5}, {2, 5}, {1, 5}, {0, 5}}, | |||
{{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, | |||
{{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, | |||
{{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, | |||
}; | |||
#endif |
@ -0,0 +1,67 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
#include "quantum.h" | |||
#define ___ KC_NO | |||
#ifndef FLIP_HALF | |||
#define LAYOUT_ortho_3x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ R04, R03, R02, R01, R00 }, \ | |||
{ R14, R13, R12, R11, R10 }, \ | |||
{ R24, R23, R22, R21, R20 } \ | |||
} | |||
#else | |||
#define LAYOUT_ortho_3x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ R00, R01, R02, R03, R04 }, \ | |||
{ R10, R11, R12, R13, R14 }, \ | |||
{ R20, R21, R22, R23, R24 } \ | |||
} | |||
#endif | |||
#define LAYOUT_ortho_3x5( \ | |||
L00, L01, L02, L03, L04, \ | |||
L10, L11, L12, L13, L14, \ | |||
L20, L21, L22, L23, L24 \ | |||
) { \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ }, \ | |||
{ ___, ___, ___, ___, ___ } \ | |||
} | |||
#define LAYOUT_macro LAYOUT_ortho_3x5 | |||
#define LAYOUT_split LAYOUT_ortho_3x10 | |||
#ifdef USE_I2C | |||
#error "I2C not Supported" | |||
#endif |
@ -0,0 +1,25 @@ | |||
{ | |||
"keyboard_name": "foobar", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 6, | |||
"height": 2, | |||
"layouts": { | |||
"LAYOUT_macro": { | |||
"key_count": 15, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, | |||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2} | |||
] | |||
}, | |||
"LAYOUT_split": { | |||
"key_count": 30, | |||
"layout": [ | |||
{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, | |||
{"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, | |||
{"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1,48 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#include QMK_KEYBOARD_H | |||
#define FN1_Q LT(1, KC_Q) | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_split( | |||
FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, | |||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, | |||
KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT | |||
), | |||
[1] = LAYOUT_split( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ | |||
), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
} |
@ -0,0 +1 @@ | |||
# The default split keymap for foobar |
@ -0,0 +1,19 @@ | |||
/* Copyright 2018 | |||
* | |||
* This program is free software: you can redistribute it and/or modify | |||
* it under the terms of the GNU General Public License as published by | |||
* the Free Software Foundation, either version 2 of the License, or | |||
* (at your option) any later version. | |||
* | |||
* This program is distributed in the hope that it will be useful, | |||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |||
* GNU General Public License for more details. | |||
* | |||
* You should have received a copy of the GNU General Public License | |||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
*/ | |||
#pragma once | |||
// place overrides here |
@ -0,0 +1 @@ | |||
# The default single board macro keymap for foobar |
@ -0,0 +1,18 @@ | |||
# foobar | |||
![foobar](https://2.bp.blogspot.com/-rr8TK6xg2N0/WbwVL2O7EfI/AAAAAAACDc8/209wN69ju0wAFICYYPNLIEGQhat5-5MbwCLcBGAs/s640/a.JPG) | |||
=== | |||
Split 30% keyboard that fits within the 100mm x 100mm PCB size. Can be used together as a split keyboard or as a single 15 key macropad. | |||
* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/foobar) | |||
Keyboard Maintainer: QMK Community | |||
Hardware Supported: foobar PCB | |||
Hardware Availability: [foobar project on 40% Keyboards](http://www.40percent.club/2017/09/foobar-10.html) | |||
Make example for this keyboard (after setting up your build environment): | |||
make 40percentclub/foobar:default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). |
@ -0,0 +1,85 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Processor frequency. | |||
# This will define a symbol, F_CPU, in all source code files equal to the | |||
# processor frequency in Hz. You can then use this symbol in your source code to | |||
# calculate timings. Do NOT tack on a 'UL' at the end, this will be done | |||
# automatically to create a 32-bit value in your source code. | |||
# | |||
# This will be an integer division of F_USB below, as it is sourced by | |||
# F_USB after it has run through any CPU prescalers. Note that this value | |||
# does not *change* the processor frequency - it should merely be updated to | |||
# reflect the processor speed set externally so that the code can use accurate | |||
# software delays. | |||
F_CPU = 16000000 | |||
# | |||
# LUFA specific | |||
# | |||
# Target architecture (see library "Board Types" documentation). | |||
ARCH = AVR8 | |||
# Input clock frequency. | |||
# This will define a symbol, F_USB, in all source code files equal to the | |||
# input clock frequency (before any prescaling is performed) in Hz. This value may | |||
# differ from F_CPU if prescaling is used on the latter, and is required as the | |||
# raw input clock is fed directly to the PLL sections of the AVR for high speed | |||
# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | |||
# at the end, this will be done automatically to create a 32-bit value in your | |||
# source code. | |||
# | |||
# If no clock division is performed on the input clock inside the AVR (via the | |||
# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | |||
F_USB = $(F_CPU) | |||
# Interrupt driven control endpoint task(+60) | |||
OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
# Bootloader selection | |||
# Teensy halfkay | |||
# Pro Micro caterina | |||
# Atmel DFU atmel-dfu | |||
# LUFA DFU lufa-dfu | |||
# QMK DFU qmk-dfu | |||
# atmega32a bootloadHID | |||
BOOTLOADER = caterina | |||
# If you don't know the bootloader type, then you can specify the | |||
# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
# OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) | |||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700) | |||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450) | |||
CONSOLE_ENABLE = no # Console for debug(+400) | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = yes # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches | |||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) | |||
# Enable generic behavior for split boards | |||
SPLIT_KEYBOARD = yes | |||
LAYOUTS = ortho_3x10 |