Compare commits

..

11 Commits

Author SHA1 Message Date
94f58322ac Configurable Rainbow Swirl range (#4376)
* Configurable Rainbow Swirl range

This allows tweaking of the rainbow effect to
 get different effects on keyboards with varied
 LED layouts. We found the value 1950 works on
 the RGBKB.net Sol to get a cool striped effect
 across the keyboard.

* Document RGBLIGHT_RAINBOW_SWIRL_RANGE

* Better wording for the documentation
2018-11-07 08:25:18 -08:00
a30dd2bb17 Add xd75/billypython keymap (#4381)
* Add xd75/billypython keymap

* Expand rules.mk

(cherry picked from commit 806fee94ae3a21b6ca7a34624101349b57d41b75)

* Expand billypython's rules.mk

* Remove unused stuff in whitefox/billypython
2018-11-06 17:04:02 -08:00
fc477a1ee7 Add Tragicforce 68 layout for split backspace and add configurator layouts (#4378) 2018-11-06 13:13:58 -08:00
f01a80968b Port over Noxary 268.2 from Rosakiin's Noxary Firmware (#4354)
* port over 268.2 from Noxary Firmware

* rename files

* update readme

* put rozakiin's ame in more places

* add configurator support

* Update keyboards/noxary/268_2/n268_2.c

Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com>

* Update keyboards/noxary/268_2/keymaps/default/keymap.c

Co-Authored-By: mechmerlin <30334081+mechmerlin@users.noreply.github.com>

* rename 268_2 keyboard files
2018-11-06 12:35:08 -08:00
3dec80b774 Improve wording, punctuation and capitalization in newbs_getting_started guide (#4342)
* Improve wording, punctuation and capitalization in newbs_getting_started guide

Also add some links

* Update example build command output

Co-Authored-By: vomindoraan <vomindoraan@gmail.com>

* Replace occurrences of "layout" with "keymap"

Co-Authored-By: MechMerlin <30334081+mechmerlin@users.noreply.github.com>

* Explicitly instruct users to open an MSYS2 MinGW 64-bit terminal

* MSYS2 Console → MSYS2 MinGW

* Replace thin spaces with regular spaces
2018-11-06 12:21:44 -08:00
a5d22424f4 Commit my DZ60 keymap (#4375)
* default mechmerlin keymap initial commit

* fix up the keymap

* cleanup keymap

* add rgb sleep functionality

* add the beginning of a readme

* fix that compile error

* fixup formatting

* spruce up that readme

* add RGB lighting controls to _CL layer

* update readme

* set rgb underglow color

* update readme

* fix formatting
2018-11-06 12:04:25 -08:00
29dd664589 Add whitefox/billypython keymap (#4374)
* Add keyboards/whitefox/keymaps/billypython

Cloned from vomindoraan/qmk_firmware

* Customize keymap for Linux
2018-11-06 12:03:33 -08:00
a91f439aec Helix-serial.c configuration improvement (#4370)
The new simple API can be selected.

Previous version, can select two way.
  * use old API (compatible with let's split serial.c)
  * use new API (multi-type transaction)

This version, can select three way.
  * use old API (compatible with let's split serial.c)
  * use new API (single-type transaction)
  * use new API (multi-type transaction)

There is no change in the code generated by this change.
2018-11-06 12:02:30 -08:00
8f5ac39fb9 separated all my changes into separate files, working on generalizing my relativity macros. (#4368)
* Updating to my local changes.

* Added auto-complete for joins.

* Added lights to imply current state better
2018-11-06 12:01:18 -08:00
f8d8005835 Zinc : Update to latest serial.c #4278 (#4361)
* Add Zinc keyboard

* Fix photo

* Fix readme.md

* Fix RGB LED init of monks/keymap.c

* Fix default keymap and readme.jp

* Fix change DEFS of RGB ANIMATIONS to LED_ANIMATIONS

* Add EOL

* Use serial_config_simpleapi.h

* Fix comment char

* Fix error handling in split_scomm.c : mtei works

* Fix keymaps

* Remove DISABLE_LEADER definition

* Remove pro_micro.h

* Add 2 spaces after Hardware name

* Fix keymaps
  - remove audio codes
  - change LAYOUT to LAYOUT_ortho_4X12
  - change "persistent_default_layer_set" to core function

* Use the Community Layouts feature
  -  with some clean up

* Update latest serial.c #4278
2018-11-06 12:00:02 -08:00
63e212c0b7 Add localized LED flash effect on keypress to Massdrop ALT (#4340) 2018-11-06 11:54:53 -08:00
42 changed files with 2650 additions and 697 deletions

View File

@ -122,6 +122,7 @@ The following options can be used to tweak the various animations:
|`RGBLIGHT_EFFECT_KNIGHT_LED_NUM` |`RGBLED_NUM` |The number of LEDs to have the "Knight" animation travel |
|`RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL`|`1000` |How long to wait between light changes for the "Christmas" animation, in milliseconds|
|`RGBLIGHT_EFFECT_CHRISTMAS_STEP` |`2` |The number of LEDs to group the red/green colors by for the "Christmas" animation |
|`RGBLIGHT_RAINBOW_SWIRL_RANGE` |`360` |Range adjustment for the rainbow swirl effect to get different swirls |
You can also modify the speeds that the different modes animate at:

View File

@ -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.
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.
Download the files from the links below:
[Download the latest release here.](https://github.com/qmk/qmk_toolbox/releases/latest)
For Windows: "qmk_toolbox.exe" or "qmk_toolbox_install.exe" (with installer)
* For Windows: `qmk_toolbox.exe` (portable) or `qmk_toolbox_install.exe` (installer)
* For macOS: `QMK.Toolbox.app.zip` (portable) or `QMK.Toolbox.pkg` (installer)
For Mac: "QMK.Toolbox.app.zip" or "QMK.Toolbox.pkg" (with installer)
## Set Up Your Environment
* [Newest Release](https://github.com/qmk/qmk_toolbox/releases/latest)
* [Source Code](https://github.com/qmk/qmk_toolbox/)
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.
## Environment Setup
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.
?> 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.
?> 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.
## Setup QMK
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:
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:
./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.

View File

@ -0,0 +1,138 @@
#include QMK_KEYBOARD_H
#include "customLogic.h"
#include "keymap.h"
#include "keyDefinitions.h"
#include "relativity.h"
#include "timer.h"
static int16_t fnTimer = 0;
uint32_t layer_state_set_user(uint32_t state)
{
switch (biton32(state))
{
case QWERTY:
rgblight_mode(9);
break;
case NAV_CLUSTER:
rgblight_mode(29);
break;
case GAMING:
rgblight_mode(26);
break;
case SQLMACROS:
rgblight_mode(1);
break;
case FN_LAYER:
rgblight_mode(RGBLIGHT_MODE_RAINBOW_SWIRL+5);
break;
}
return state;
}
bool printSqlVerbs(uint16_t keycode, keyrecord_t *record)
{
if (record->event.pressed)
{
switch (keycode)
{
case S_LFTJN:
SEND_STRING("LEFT JOIN");
activateRelativity();
return false;
case S_INRJN:
SEND_STRING("INNER JOIN ");
activateRelativity();
return false;
case S_SLCT:
SEND_STRING("SELECT "); return
false;
case S_FROM:
SEND_STRING("FROM "); return
false;
case S_DSNCT:
SEND_STRING("DISTINCT "); return
false;
case S_ORDER:
SEND_STRING("ORDER BY "); return
false;
case S_WHERE:
SEND_STRING("WHERE "); return
false;
case S_ALTER:
SEND_STRING("ALTER SESSION SET CURRENT_SCHEMA = SUPPLY;"); return false;
case S_ASTRK:
SEND_STRING("* "); return false;
}
}
return true;
}
bool isFn = false;
bool didFn = false;
bool updateLayerState(uint16_t keycode, keyrecord_t *record)
{
if (record->event.pressed)
{
switch (keycode)
{
case FN_QT:
fnTimer = timer_read();
layer_on(FN_LAYER);
isFn = true;
return false;
}
if (isFn)
{
didFn = true;
return true;
}
}
else
{
switch(keycode)
{
case FN_QT:
layer_off(FN_LAYER);
if (!didFn)
{
#if fnTimeout
if (TIMER_DIFF_16(timer_read(), fnTimer) <= fnTimeout)
{
activateRelativity();
}
else
{
deactivateRelativity();
}
#else
activateRelativity();
#endif
}
didFn = false;
isFn = false;
return false;
}
}
return true;
}
bool process_record_user(uint16_t keycode, keyrecord_t *record)
{
return
storeShiftState(keycode, record) &&
printSqlVerbs(keycode, record) &&
updateLayerState(keycode, record) &&
handleSmartMacros(keycode, record);
}

View File

@ -0,0 +1,10 @@
#define fnTimeout 500
uint32_t layer_state_set_user(uint32_t state);
bool printSqlVerbs(uint16_t keycode, keyrecord_t *record);
bool updateLayerState(uint16_t keycode, keyrecord_t *record);
bool process_record_user(uint16_t keycode, keyrecord_t *record);

View File

@ -0,0 +1,124 @@
//Control
#define MO_FNLR MO(FN_LAYER)
#define BACKSPC KC_BSPC
#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT)
#define ESCAP KC_ESC
#define PSCR KC_PSCREEN
#define SCRL KC_SCROLLLOCK
#define PAUS KC_PAUSE
#define NSRT KC_INSERT
#define HOME KC_HOME
#define PGUP KC_PGUP
#define PGDN KC_PGDN
#define END_ KC_END
#define DELT KC_DELETE
#define UPUP KC_UP
#define D_WN KC_DOWN
#define LEFT KC_LEFT
#define RGHT KC_RIGHT
//KEYPAD
#define KP_1 KC_KP_1
#define KP_2 KC_KP_2
#define KP_3 KC_KP_3
#define KP_4 KC_KP_4
#define KP_5 KC_KP_5
#define KP_6 KC_KP_6
#define KP_7 KC_KP_7
#define KP_8 KC_KP_8
#define KP_9 KC_KP_9
#define KP_0 KC_KP_0
#define NMLK KC_NUMLOCK
#define STAR KC_KP_ASTERISK
#define KSSH KC_KP_SLASH
#define KMIN KC_KP_MINUS
#define PLUS KC_KP_PLUS
#define KNTR KC_KP_ENTER
#define KDOT KC_KP_DOT
//Modifiers
#define CTLL KC_LCTL
#define LEFTSHFT KC_LSPO
#define WINL KC_LGUI
#define ALTL KC_LALT
#define CTLR KC_RCTL
#define RIGHT_SHIFT__PAREN KC_RSPC
#define WINR KC_RGUI
#define ALTR KC_RALT
#define APPR KC_APP
//Punctuation
#define CMMA KC_COMM
#define PRRD KC_DOT
#define SLSH KC_SLSH
#define QUOT KC_QUOT
#define COLN KC_SCLN
#define LBRC KC_LBRC
#define RBRC KC_RBRC
#define EQUL KC_EQL
#define MNUS KC_MINS
#define BSLASH KC_BSLS
//Layers
#define QWRTY TO(QWERTY)
#define NAVS TO(NAV_CLUSTER)
#define GAME TO(GAMING)
//Space
#define ____ KC_TRNS
#define _____ KC_TRNS
#define ______ KC_TRNS
#define _______ KC_TRNS
#define ________ KC_TRNS
#define ___________ KC_TRNS
#define _________________ KC_TRNS
#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC
#define KCNO KC_NO
enum sql_macros {
S_LFTJN = SAFE_RANGE, // L
S_INRJN, // I
S_SLCT, // S
S_FROM, // F
S_DSNCT, // D
S_ORDER, // O
S_WHERE, // W
S_ALTER, // Esc
S_ASTRK, // *
TD_A,
TD_B,
TD_C, // Corp, Corporation, Company
TD_D, // Distribution, Dist, Distributor
TD_E,
TD_F,
TD_G, // GlobalLookup
TD_H,
TD_I, // Instance, Item
TD_J,
TD_K,
TD_L,
TD_M,
TD_N, // NadRate
TD_O,
TD_P, // Product, Person,
TD_Q, // Darden
TD_R,
TD_S, // Supplier, Step
TD_T, // Task, Type
TD_U,
TD_V,
TD_W, // Workflow,
TD_X,
TD_Y,
TD_Z,
TD_BSPC,
TD_ENT,
TD_ESC,
FN_QT
};
bool isShifted(void);

File diff suppressed because it is too large Load Diff

View File

@ -1,105 +1,15 @@
#include "quantum.h"
//Control
#define MO_FNLR MO(FN_LAYER)
#define BACKSPC KC_BSPC
#define ENTER_OR_SQL LT(SQLMACROS,KC_ENT)
#define ESCAP KC_ESC
#define PSCR KC_PSCREEN
#define SCRL KC_SCROLLLOCK
#define PAUS KC_PAUSE
#define NSRT KC_INSERT
#define HOME KC_HOME
#define PGUP KC_PGUP
#define PGDN KC_PGDN
#define END_ KC_END
#define DELT KC_DELETE
#define UPUP KC_UP
#define D_WN KC_DOWN
#define LEFT KC_LEFT
#define RGHT KC_RIGHT
//KEYPAD
#define KP_1 KC_KP_1
#define KP_2 KC_KP_2
#define KP_3 KC_KP_3
#define KP_4 KC_KP_4
#define KP_5 KC_KP_5
#define KP_6 KC_KP_6
#define KP_7 KC_KP_7
#define KP_8 KC_KP_8
#define KP_9 KC_KP_9
#define KP_0 KC_KP_0
#define NMLK KC_NUMLOCK
#define STAR KC_KP_ASTERISK
#define KSSH KC_KP_SLASH
#define KMIN KC_KP_MINUS
#define PLUS KC_KP_PLUS
#define KNTR KC_KP_ENTER
#define KDOT KC_KP_DOT
//Modifiers
#define CTLL KC_LCTL
#define LEFTSHFT KC_LSPO
#define WINL KC_LGUI
#define ALTL KC_LALT
#define CTLR KC_RCTL
#define RIGHT_SHIFT__PAREN KC_RSPC
#define WINR KC_RGUI
#define ALTR KC_RALT
#define APPR KC_APP
#include QMK_KEYBOARD_H
//Punctuation
#define CMMA KC_COMM
#define PRRD KC_DOT
#define SLSH KC_SLSH
#define QUOT KC_QUOT
#define COLN KC_SCLN
#define LBRC KC_LBRC
#define RBRC KC_RBRC
#define EQUL KC_EQL
#define MNUS KC_MINS
#define BSLASH KC_BSLS
enum marianas_layers {
QWERTY,
/*
COLEMAK,
DVORAK,
*/
NAV_CLUSTER,
GAMING,
SQLMACROS,
FN_LAYER
};
//Layers
#define QWRTY TO(QWERTY)
#define NAVS TO(NAV_CLUSTER)
#define GAME TO(GAMING)
//Space
#define ____ KC_TRNS
#define _____ KC_TRNS
#define ______ KC_TRNS
#define _______ KC_TRNS
#define ________ KC_TRNS
#define ___________ KC_TRNS
#define _________________ KC_TRNS
#define SPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACE KC_SPC
#define KCNO KC_NO
#define macroTapsLen 32
#define tableNameListLen 32
#define charCountLen 32
void initStringData(void);
uint32_t layer_state_set_user(uint32_t state);
bool containsCode(uint16_t kc);
bool lastCodeIs(uint16_t kc);
bool last2CodeAre(uint16_t kc);
bool last2CodesAre(uint16_t kc, uint16_t kc2);
void addKeyCode(uint16_t kc);
void eraseKeyCodes(void);
void eraseCharCounts(void);
void printTableAbbreviation(void);
void eraseTableAbbreviation(void);
void printString(char* str);
void printStringAndQueueChar(char* str);
void ReplaceString(char *orig, char *repl);
void deletePrev(void);
void processSmartMacroTap(uint16_t kc);
bool process_record_user(uint16_t keycode, keyrecord_t *record);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
#include QMK_KEYBOARD_H
#define macroTapsLen 32
#define tableNameListLen 32
#define charCountLen 32
#define relTimeout 1500
void activateRelativity(void);
bool deactivateRelativity(void);
void initStringData(void);
bool containsCode(uint16_t kc);
bool lastCodeIs(uint16_t kc);
bool last2CodeAre(uint16_t kc);
bool last2CodesAre(uint16_t kc, uint16_t kc2);
void addKeyCode(uint16_t kc);
void eraseKeyCodes(void);
void eraseCharCounts(void);
void printTableAbbreviation(void);
void eraseTableAbbreviation(void);
void printString(char* str);
void printStringAndQueueChar(char* str);
void ReplaceString(char *orig, char *repl);
void deletePrev(void);
bool processSmartMacroTap(uint16_t kc);
bool isShifted(void);
void setShifted(bool);
bool handleSmartMacros(uint16_t keycode, keyrecord_t *record);
bool storeShiftState(uint16_t keycode, keyrecord_t *record);

View File

@ -15,3 +15,7 @@ AUDIO_ENABLE = no
RGBLIGHT_ENABLE = yes
TAP_DANCE_ENABLE = no
AUTO_SHIFT_ENABLE = no
SRC += relativity.c
SRC += customLogic.c

View File

@ -0,0 +1,6 @@
#pragma once
// Turn off RGB when computer goes to sleep
#ifdef RGBLIGHT_ENABLE
#define RGBLIGHT_SLEEP
#endif // RGBLIGHT_ENABLE

View File

@ -0,0 +1,40 @@
#include QMK_KEYBOARD_H
enum keyboard_layers {
_BL = 0, // Base Layer
_FL, // Function Layer
_CL // Control Layer
};
// Custom #defined keycodes (shorter macros for readability)
#define KC_CTCP LCTL_T(KC_CAPS)
#define KC_RSSH RSFT_T(KC_SLSH)
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BL] = LAYOUT_60_b_ansi(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC,
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_RBRC, KC_BSLS,
KC_CTCP, 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_RSSH, KC_UP, KC_DEL,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
[_FL] = LAYOUT_60_b_ansi(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_DEL,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_PGUP, MO(_CL),
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END),
[_CL] = LAYOUT_60_b_ansi(
RESET, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_SPI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
};
// Set underglow RGB leds to yellow
// Find the list of available colors in quantum/rgblight_list.h
void matrix_init_user(void) {
rgblight_sethsv_noeeprom_yellow();
}

View File

@ -0,0 +1,68 @@
# MechMerlin's DZ60 Keymap
The purpose of this keymap is to provide examples on how to do some common QMK features.
Make example for this keyboard (after setting up your build environment):
make dz60:mechmerlin
## Merlin's DZ60 Hardware Info
---
The DZ60 is a 60% pcb produced by KBDFans. It comes in two variants, USB Mini B and USB C. It supports many many layouts. It also supports both backlight and RGB underglow. The USB C variant does not have a hardware reset switch. USB C to C is not supported.
Merlin's DZ60 uses
- Layout B, in QMK this is LAYOUT_60_b_ansi.
- USB C
- 50g Zilents
- Arrows are 78g Zilents
- KPRepublic XD64 Case
## Layers
---
Merlin's keymap has three different layers. To switch layers you can use the `MO(X)` keycode, where `X` is the layer you want to switch to.
### _BL
This is the base layer also known as layer 0. It is a standard QWERTY layout. It has the `_FL` layer switch key.
### _FL
This is the function layer also known as layer 1. It utiizes the following:
- Function Keys
- Navigation Keys
- Audio keys such as Mute, Volume Down and Volume Up.
- `_CL` layer switch key
### _CL
This is the control layer also known as layer 2. It utilizes the following:
- RGB Controls
- `RESET` key
## Non Standard Keycodes
---
### RESET
As long `BOOTMAGIC_ENABLE` is set to `yes` in `rules.mk`, the DZ60 can be put into bootloader mode by holding the `space` key and the `b` key while plugging in. However sometmes this doesn't work or is troublesome to do, might as well use the `RESET` keycode to accomplish this.
### RSFT_T(KC_SLSH)
Layout B is missing the `?` key and is instead replaced with a `right shift`. This keycode makes it so that the key can be tapped for `?` and held for `right shift`.
### LCTL_T(KC_CAPS)
`Caps Lock` is only ever used by tapping, why not use it as a `control` key when held? This keycode makes it so that the key can be tapped for `caps lock` and held for `control`.
## RGB Lighting
---
### RGBLIGHT_SLEEP
This is set in `mechmerlin/config.h` so that when the computer goes to sleep, the RGB lights will also go to sleep on the keyboard. They will turn back on when the computer wakes.
### RGB Underglow Color: Yellow
This is set in `mechmerlin/keymap.c` in the `matrix_init_user` function. The list of available colors can be found in [`quantum/rgblight_list.h`](https://github.com/qmk/qmk_firmware/blob/388df5359b913eaf1ce6fb0ef624e430ad010ea5/quantum/rgblight_list.h#L59-L121).

View File

@ -71,8 +71,8 @@
#endif
//////////////// for backward compatibility ////////////////////////////////
#ifndef SERIAL_USE_MULTI_TRANSACTION
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
/* --- USE OLD API (compatible with let's split serial.c) */
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0};
#endif
@ -112,7 +112,7 @@ int serial_update_buffers()
return result;
}
#endif // end of Simple API (OLD API, compatible with let's split serial.c)
#endif // end of OLD API (compatible with let's split serial.c)
////////////////////////////////////////////////////////////////////////////
#define ALWAYS_INLINE __attribute__((always_inline))

View File

@ -15,31 +15,36 @@
// // 4: about 26kbps
// // 5: about 20kbps
//
// //// USE Simple API (OLD API, compatible with let's split serial.c)
// //// USE OLD API (compatible with let's split serial.c)
// ex.
// #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2
// #define SERIAL_MASTER_BUFFER_LENGTH 1
//
// //// USE flexible API (using multi-type transaction function)
// #define SERIAL_USE_MULTI_TRANSACTION
// //// USE NEW API
// //// USE simple API (using signle-type transaction function)
// #define SERIAL_USE_SINGLE_TRANSACTION
// //// USE flexible API (using multi-type transaction function)
// #define SERIAL_USE_MULTI_TRANSACTION
//
// /////////////////////////////////////////////////////////////////
#ifndef SERIAL_USE_MULTI_TRANSACTION
/* --- USE Simple API (OLD API, compatible with let's split serial.c) */
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
#endif
#if SERIAL_MASTER_BUFFER_LENGTH > 0
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
#endif
//////////////// for backward compatibility ////////////////////////////////
#if !defined(SERIAL_USE_SINGLE_TRANSACTION) && !defined(SERIAL_USE_MULTI_TRANSACTION)
/* --- USE OLD API (compatible with let's split serial.c) */
#if SERIAL_SLAVE_BUFFER_LENGTH > 0
extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH];
#endif
#if SERIAL_MASTER_BUFFER_LENGTH > 0
extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH];
#endif
void serial_master_init(void);
void serial_slave_init(void);
int serial_update_buffers(void);
void serial_master_init(void);
void serial_slave_init(void);
int serial_update_buffers(void);
#endif // USE Simple API
#endif // end of USE OLD API
////////////////////////////////////////////////////////////////////////////
// Soft Serial Transaction Descriptor
typedef struct _SSTD_t {

View File

@ -0,0 +1,195 @@
#include QMK_KEYBOARD_H
#include "rgb_matrix_user.h"
enum alt_keycodes {
L_BRI = SAFE_RANGE, //LED Brightness Increase
L_BRD, //LED Brightness Decrease
L_PTN, //LED Pattern Select Next
L_PTP, //LED Pattern Select Previous
L_PSI, //LED Pattern Speed Increase
L_PSD, //LED Pattern Speed Decrease
L_T_MD, //LED Toggle Mode
L_T_ONF, //LED Toggle On / Off
L_ON, //LED On
L_OFF, //LED Off
L_T_BR, //LED Toggle Breath Effect
L_T_PTD, //LED Toggle Scrolling Pattern Direction
U_T_AUTO, //USB Extra Port Toggle Auto Detect / Always Active
U_T_AGCR, //USB Toggle Automatic GCR control
DBG_TOG, //DEBUG Toggle On / Off
DBG_MTRX, //DEBUG Toggle Matrix Prints
DBG_KBD, //DEBUG Toggle Keyboard Prints
DBG_MOU, //DEBUG Toggle Mouse Prints
MD_BOOT, //Restart into bootloader after hold timeout
};
#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
#define ______ KC_TRNS
keymap_config_t keymap_config;
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
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_RBRC, KC_BSLS, KC_HOME, \
KC_CAPS, 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_PGUP, \
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \
),
[1] = LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_MUTE, \
_______, _______, _______, KC_UP, _______, _______, _______, U_T_AUTO,U_T_AGCR,_______, KC_PSCR, KC_SLCK, KC_PAUS, _______, KC_END, \
_______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, KC_VOLU, _______, \
_______, _______, _______, KC_MPLY, MO(2), _______, KC_MRWD, KC_VOLD, KC_MFFD \
),
[2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, L_T_MD, L_T_ONF, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, _______ \
),
};
const uint16_t PROGMEM fn_actions[] = {
};
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
};
#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT))
#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL))
#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT))
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
static uint32_t key_timer;
rgb_matrix_record_key_press(record);
switch (keycode) {
case L_BRI:
if (record->event.pressed) {
if (LED_GCR_STEP > LED_GCR_MAX - gcr_desired) gcr_desired = LED_GCR_MAX;
else gcr_desired += LED_GCR_STEP;
if (led_animation_breathing) gcr_breathe = gcr_desired;
}
return false;
case L_BRD:
if (record->event.pressed) {
if (LED_GCR_STEP > gcr_desired) gcr_desired = 0;
else gcr_desired -= LED_GCR_STEP;
if (led_animation_breathing) gcr_breathe = gcr_desired;
}
return false;
case L_PTN:
if (record->event.pressed) {
if (led_animation_id == led_setups_count - 1) led_animation_id = 0;
else led_animation_id++;
}
return false;
case L_PTP:
if (record->event.pressed) {
if (led_animation_id == 0) led_animation_id = led_setups_count - 1;
else led_animation_id--;
}
return false;
case L_PSI:
if (record->event.pressed) {
led_animation_speed += ANIMATION_SPEED_STEP;
}
return false;
case L_PSD:
if (record->event.pressed) {
led_animation_speed -= ANIMATION_SPEED_STEP;
if (led_animation_speed < 0) led_animation_speed = 0;
}
return false;
case L_T_MD:
if (record->event.pressed) {
led_lighting_mode++;
if (led_lighting_mode > LED_MODE_MAX_INDEX) led_lighting_mode = LED_MODE_NORMAL;
}
return false;
case L_T_ONF:
if (record->event.pressed) {
led_enabled = !led_enabled;
I2C3733_Control_Set(led_enabled);
}
return false;
case L_ON:
if (record->event.pressed) {
led_enabled = 1;
I2C3733_Control_Set(led_enabled);
}
return false;
case L_OFF:
if (record->event.pressed) {
led_enabled = 0;
I2C3733_Control_Set(led_enabled);
}
return false;
case L_T_BR:
if (record->event.pressed) {
led_animation_breathing = !led_animation_breathing;
if (led_animation_breathing) {
gcr_breathe = gcr_desired;
led_animation_breathe_cur = BREATHE_MIN_STEP;
breathe_dir = 1;
}
}
return false;
case L_T_PTD:
if (record->event.pressed) {
led_animation_direction = !led_animation_direction;
}
return false;
case U_T_AUTO:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_extra_manual, "USB extra port manual mode");
}
return false;
case U_T_AGCR:
if (record->event.pressed && MODS_SHIFT && MODS_CTRL) {
TOGGLE_FLAG_AND_PRINT(usb_gcr_auto, "USB GCR auto mode");
}
return false;
case DBG_TOG:
if (record->event.pressed) {
TOGGLE_FLAG_AND_PRINT(debug_enable, "Debug mode");
}
return false;
case DBG_MTRX:
if (record->event.pressed) {
TOGGLE_FLAG_AND_PRINT(debug_matrix, "Debug matrix");
}
return false;
case DBG_KBD:
if (record->event.pressed) {
TOGGLE_FLAG_AND_PRINT(debug_keyboard, "Debug keyboard");
}
return false;
case DBG_MOU:
if (record->event.pressed) {
TOGGLE_FLAG_AND_PRINT(debug_mouse, "Debug mouse");
}
return false;
case MD_BOOT:
if (record->event.pressed) {
key_timer = timer_read32();
} else {
if (timer_elapsed32(key_timer) >= 500) {
reset_keyboard();
}
}
return false;
default:
return true; //Process all other keycodes normally
}
}

View File

@ -0,0 +1,193 @@
#include "quantum.h"
#include "led_matrix.h"
extern issi3733_led_t *led_cur;
extern uint8_t led_per_run;
extern issi3733_led_t *lede;
extern issi3733_led_t led_map[];
static uint16_t last_boost_update;
static uint8_t led_boosts[ISSI3733_LED_COUNT];
static uint8_t led_boost_index;
static uint8_t led_cur_index;
#define LED_BOOST_REFRESH_INTERVAL_IN_MS 40
#define LED_BOOST_DECAY 0.7
#define LED_BOOST_PROPAGATE 0.5
#define LED_BOOST_PEAK 100
#define MIN_RGB 0x050008
#define MIN_R (MIN_RGB >> 16 & 0xff)
#define MIN_G (MIN_RGB >> 8 & 0xff)
#define MIN_B (MIN_RGB & 0xff)
#define MAX_RGB 0xc26eff
#define MAX_R (MAX_RGB >> 16 & 0xff)
#define MAX_G (MAX_RGB >> 8 & 0xff)
#define MAX_B (MAX_RGB & 0xff)
#define UNDERGLOW_RGB 0x4f002e
#define UNDERGLOW_R (UNDERGLOW_RGB >> 16 & 0xff)
#define UNDERGLOW_G (UNDERGLOW_RGB >> 8 & 0xff)
#define UNDERGLOW_B (UNDERGLOW_RGB & 0xff)
#define UNDERGLOW_SCAN_CODE 255
#define max(a, b) (((a) > (b)) ? (a) : (b))
#define __ -1
static const uint8_t KEY_TO_LED_MAP[MATRIX_ROWS][MATRIX_COLS] = {
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14},
{15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29},
{30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, __, 42, 43},
{44, __, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57},
{58, 59, 60, __, __, __, 61, __, __, __, 62, 63, 64, 65, 66},
};
#define KEY_LED_COUNT 67
#define KP(c, r) { .col = c, .row = r } // shorthand for keypos_t
static const keypos_t LED_TO_KEY_MAP[KEY_LED_COUNT] = {
KP(0, 0), KP(1, 0), KP(2, 0), KP(3, 0), KP(4, 0), KP(5, 0), KP(6, 0), KP(7, 0), KP(8, 0), KP(9, 0), KP(10, 0), KP(11, 0), KP(12, 0), KP(13, 0), KP(14, 0),
KP(0, 1), KP(1, 1), KP(2, 1), KP(3, 1), KP(4, 1), KP(5, 1), KP(6, 1), KP(7, 1), KP(8, 1), KP(9, 1), KP(10, 1), KP(11, 1), KP(12, 1), KP(13, 1), KP(14, 1),
KP(0, 2), KP(1, 2), KP(2, 2), KP(3, 2), KP(4, 2), KP(5, 2), KP(6, 2), KP(7, 2), KP(8, 2), KP(9, 2), KP(10, 2), KP(11, 2), KP(13, 2), KP(14, 2),
KP(0, 3), KP(2, 3), KP(3, 3), KP(4, 3), KP(5, 3), KP(6, 3), KP(7, 3), KP(8, 3), KP(9, 3), KP(10, 3), KP(11, 3), KP(12, 3), KP(13, 3), KP(14, 3),
KP(0, 4), KP(1, 4), KP(2, 4), KP(6, 4), KP(10, 4), KP(11, 4), KP(12, 4), KP(13, 4), KP(14, 4),
};
static void update_led_boosts(void);
static void update_led_cur_rgb_values(void);
static void set_nearest_led_to_max(uint8_t col, uint8_t row);
static uint8_t calculate_new_color_component_value(uint8_t max, uint8_t min);
static void calculate_new_led_boosts(uint8_t new_led_boosts[]);
static uint8_t calculate_new_led_boost_at(int index);
static uint8_t get_propagated_boost_from_neighbors(int led_position);
static uint8_t get_led_boost_at_keypos(uint8_t row, uint8_t col);
static void set_new_led_boosts(uint8_t* new_led_boosts);
static uint8_t map_key_position_to_led_index(uint8_t col, uint8_t row);
void rgb_matrix_init_user(void) {
for (int i = 0; i < ISSI3733_LED_COUNT; i++) {
led_boosts[i] = 0;
}
last_boost_update = timer_read();
led_boost_index = 0;
led_cur_index = 0;
}
void led_matrix_run(void) {
uint8_t led_this_run = 0;
if (led_cur == 0) { //Denotes start of new processing cycle in the case of chunked processing
led_cur = led_map;
led_cur_index = 0;
}
update_led_boosts();
while (led_cur < lede && led_this_run < led_per_run) {
update_led_cur_rgb_values();
led_cur++;
led_cur_index++;
led_this_run++;
}
}
void rgb_matrix_record_key_press(keyrecord_t *record) {
if (record->event.pressed) {
keypos_t key = record->event.key;
set_nearest_led_to_max(key.col, key.row);
}
}
static void update_led_boosts(void) {
if (timer_elapsed(last_boost_update) > LED_BOOST_REFRESH_INTERVAL_IN_MS) {
last_boost_update = timer_read();
uint8_t new_led_boosts[ISSI3733_LED_COUNT];
calculate_new_led_boosts(new_led_boosts);
set_new_led_boosts(new_led_boosts);
}
}
static void update_led_cur_rgb_values(void) {
if (led_cur->scan == UNDERGLOW_SCAN_CODE) {
*led_cur->rgb.r = UNDERGLOW_R;
*led_cur->rgb.g = UNDERGLOW_G;
*led_cur->rgb.b = UNDERGLOW_B;
} else {
*led_cur->rgb.r = calculate_new_color_component_value(MAX_R, MIN_R);
*led_cur->rgb.g = calculate_new_color_component_value(MAX_G, MIN_G);
*led_cur->rgb.b = calculate_new_color_component_value(MAX_B, MIN_B);
}
}
static void set_nearest_led_to_max(uint8_t col, uint8_t row) {
uint8_t led_index = map_key_position_to_led_index(col, row);
if (led_index >= 0 && led_index < ISSI3733_LED_COUNT) {
led_boosts[led_index] = LED_BOOST_PEAK;
}
}
static uint8_t calculate_new_color_component_value(uint8_t max, uint8_t min) {
uint8_t current_boost = led_boosts[led_cur_index];
return (float)(max - min) * current_boost / LED_BOOST_PEAK + min;
}
static void calculate_new_led_boosts(uint8_t new_led_boosts[]) {
for (int i = 0; i < ISSI3733_LED_COUNT; i++) {
new_led_boosts[i] = calculate_new_led_boost_at(i);
}
}
static uint8_t calculate_new_led_boost_at(int index) {
uint8_t decayed_boost = led_boosts[index] * LED_BOOST_DECAY;
uint8_t propagated_boost = get_propagated_boost_from_neighbors(index);
uint8_t new_boost = (propagated_boost > decayed_boost) ? propagated_boost : decayed_boost;
if (new_boost > LED_BOOST_PEAK) {
new_boost = LED_BOOST_PEAK;
}
return new_boost;
}
static uint8_t get_propagated_boost_from_neighbors(int led_position) {
if (led_position < 0 || led_position >= KEY_LED_COUNT) {
return 0;
}
keypos_t led_keypos = LED_TO_KEY_MAP[led_position];
uint8_t top_boost = get_led_boost_at_keypos(led_keypos.row - 1, led_keypos.col);
uint8_t bottom_boost = get_led_boost_at_keypos(led_keypos.row + 1, led_keypos.col);
uint8_t left_boost = get_led_boost_at_keypos(led_keypos.row, led_keypos.col - 1);
uint8_t right_boost = get_led_boost_at_keypos(led_keypos.row, led_keypos.col + 1);
uint8_t max_boost = max(max(top_boost, bottom_boost), max(left_boost, right_boost));
if (max_boost > LED_BOOST_PEAK) {
max_boost = LED_BOOST_PEAK;
}
return max_boost * LED_BOOST_PROPAGATE;
}
static uint8_t get_led_boost_at_keypos(uint8_t row, uint8_t col) {
if (row < 0 || row >= MATRIX_ROWS || col < 0 || col >= MATRIX_COLS) {
return 0;
}
uint8_t led_index = KEY_TO_LED_MAP[row][col];
if (led_index < 0) {
return 0;
}
return led_boosts[led_index];
}
static void set_new_led_boosts(uint8_t* new_led_boosts) {
for (int i = 0; i < ISSI3733_LED_COUNT; i++) {
led_boosts[i] = new_led_boosts[i];
}
}
static uint8_t map_key_position_to_led_index(uint8_t col, uint8_t row) {
if (row >= 0 && row < MATRIX_ROWS && col >= 0 && col < MATRIX_COLS) {
return KEY_TO_LED_MAP[row][col];
}
return -1;
}

View File

@ -0,0 +1,3 @@
#pragma once
void rgb_matrix_record_key_press(keyrecord_t *record);

View File

@ -0,0 +1,34 @@
# project specific files
SRC = led_programs.c
SRC += matrix.c
SRC += rgb_matrix_user.c
#For platform and packs
ARM_ATSAM = SAMD51J18A
MCU = cortex-m4
CUSTOM_MATRIX = yes
# Build Options
# comment out to disable the options.
#
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 = no # Console for debug(+400)
COMMAND_ENABLE = no # 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)
VIRTSER_ENABLE = no # USB Serial Driver
RAW_ENABLE = no # Raw device
AUTO_SHIFT_ENABLE = no # Auto Shift

View File

@ -0,0 +1,54 @@
/* Copyright 2018 Rozakiin
*
* 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 "268_2.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);
}
__attribute__((weak))
void led_set_user(uint8_t usb_led) {
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
DDRB |= (1 << 0); PORTB |= (1 << 0);
}
else {
DDRB &= ~(1 << 0); PORTB &= ~(1 << 0);
}
}

View File

@ -0,0 +1,43 @@
/* Copyright 2018 Rozakiin
*
* 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/>.
*/
#ifndef N268_2_H
#define N268_2_H
#include "quantum.h"
/* This a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, \
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, \
K400, K401, K402, K406, K409, K410, K412, K414, K415 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, KC_NO, K214, K215, }, \
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, K314, K315, }, \
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, K409, K410, KC_NO, K412, KC_NO, K414, K415, } \
}
#endif

View File

@ -0,0 +1,221 @@
/*
Copyright 2018 Rozakiin
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 0x4E58
#define PRODUCT_ID 0x0044
#define DEVICE_VER 0x0002
#define MANUFACTURER Noxary
#define PRODUCT 268.2
#define DESCRIPTION QMK keyboard firmware for 268.2
/* key matrix size */
#define MATRIX_ROWS 5
#define MATRIX_COLS 16
/*
* 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)
*
*/
/* key matrix pins */
#define MATRIX_ROW_PINS { F7, F6, F5, F0, B5 }
#define MATRIX_COL_PINS { C6, B6, C7, F4, E6, D0, D7, D1, D2, B4, D6, D4, D5, F1, D3, B1 }
#define UNUSED_PINS
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
#define DIODE_DIRECTION COL2ROW
/* number of backlight levels */
#define BACKLIGHT_PIN B7
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#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
*/
/* Bootmagic Lite key configuration */
// #define BOOTMAGIC_LITE_ROW 0
// #define BOOTMAGIC_LITE_COLUMN 0

View File

@ -0,0 +1,12 @@
{
"keyboard_name": "Noxary 268.2",
"url": "",
"maintainer": "qmk",
"width": 16,
"height": 5,
"layouts": {
"LAYOUT": {
"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":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0, "w":2}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":2.25}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}]
}
}
}

View File

@ -0,0 +1,19 @@
/* Copyright 2018 Rozakiin
*
* 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

View File

@ -0,0 +1,83 @@
#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 _BL 0
#define _FL1 1
#define _FL2 2
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* _BL: Base Layer(Default) - For ISO enter use ANSI enter
* ,----------------------------------------------------------------.
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|BSpc| Grv|
* |----------------------------------------------------------------|
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Del|
* |----------------------------------------------------------------|
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent|PgUp|
* |----------------------------------------------------------------|
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn|
* |----------------------------------------------------------------|
* |Ctrl|Win |Alt | Space |Alt|Mo(1)|Ctrl|Lef|Dow|Rght|
* `----------------------------------------------------------------'
*/
[_BL] = LAYOUT(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_GRV,
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_RBRC, KC_BSLS, KC_DEL,
KC_CAPS, 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_PGUP,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT),
/* _FL1: Function Layer 1 - For ISO enter use ANSI enter
* ,----------------------------------------------------------------.
* | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |PScr| |
* |----------------------------------------------------------------|
* | | | | |RST| | | | | | | | | | Ins|
* |----------------------------------------------------------------|
* | | | | | | | | | | | | | | |Home|
* |----------------------------------------------------------------|
* | | | | | | | | | |Bl-|Bl+| |Mute|Vol+| End|
* |----------------------------------------------------------------|
* | | | | BL_Toggle | | | | |Vol-| |
* `----------------------------------------------------------------'
*/
[_FL1] = LAYOUT(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PSCR, _______,
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME,
_______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_INC, _______, KC_MUTE, KC_VOLU, KC_END,
_______, _______, _______, BL_TOGG, _______, _______, _______, KC_VOLD, _______),
/* _FL2: Function Layer 2 - For ISO enter use ANSI enter
* ,----------------------------------------------------------------.
* | | | | | | | | | | | | | | | | |
* |----------------------------------------------------------------|
* | | | | | | | | | | | | | | | |
* |----------------------------------------------------------------|
* | | | | | | | | | | | | | | | |
* |----------------------------------------------------------------|
* | | | | | | | | | | | | | | | |
* |----------------------------------------------------------------|
* | | | | | | | | | | |
* `----------------------------------------------------------------'
*/
[_FL2] = LAYOUT(
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______),
};
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
return true;
}

View File

@ -0,0 +1 @@
# The default keymap for 268_2

View File

@ -0,0 +1,16 @@
# Noxary 268.2
![268.2](https://www.keebtalk.com/uploads/db8059/original/2X/6/65b93c83cadd98bbf8e3b1d739621d54b682609a.jpg)
A fully customizable 65% keyboard.
* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin)
* Hardware Supported: 268.2 PCB
* rev1
* Hardware Availability: [Noxary](https://shop.noxary.co/collections/268-2/products/noxary-268-2-polycarbonate)
Make example for this keyboard (after setting up your build environment):
make noxary/268_2: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).

View File

@ -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 = atmel-dfu
# 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 = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # 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 = yes # 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)

View File

@ -4,6 +4,8 @@ All files related to firmware of Noxary Keyboards designed by [Rozakiin](https:/
### Keyboards
- [268](./268/): Original repo [here](https://github.com/Rozakiin/Noxary_Firmware). Imported by kind [permission](https://github.com/Rozakiin/Noxary_Firmware/issues/1) of @rozakiin
- [268](./268/): Original repo [here](https://github.com/Rozakiin/Noxary_Firmware). Imported by kind [permission](https://github.com/Rozakiin/Noxary_Firmware/issues/1) of @rozakiin
- [x268](./x268/): Original repo [here](https://github.com/Rozakiin/Noxary_Firmware). Imported by kind [permission](https://github.com/Rozakiin/Noxary_Firmware/issues/1) of @rozakiin
- [268.2](./268_2/): Original repo [here](https://github.com/Rozakiin/Noxary_Firmware). Imported by kind [permission](https://github.com/Rozakiin/Noxary_Firmware/issues/1) of @rozakiin
- [x268](./x268/): Original repo [here](https://github.com/Rozakiin/Noxary_Firmware). Imported by kind [permission](https://github.com/Rozakiin/Noxary_Firmware/issues/1) of @rozakiin

View File

@ -5,8 +5,238 @@
"width": 17.25,
"height": 5,
"layouts": {
"LAYOUT": {
"layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"x":15.25, "y":0}, {"x":16.25, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"x":15.25, "y":1}, {"x":16.25, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"x":15.25, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"x":14.25, "y":4}, {"x":15.25, "y":4}, {"x":16.25, "y":4}]
}
"LAYOUT": {
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":" {", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"|", "x":13.5, "y":1, "w":1.5},
{"x":15.25, "y":1},
{"x":16.25, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
{"x":15.25, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":6.25},
{"label":"Alt", "x":10, "y":4, "w":1.25},
{"label":"Win", "x":11.25, "y":4, "w":1.25},
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
{"x":14.25, "y":4},
{"x":15.25, "y":4},
{"x":16.25, "y":4}
]
},
"LAYOUT_split_space": {
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Backspace", "x":13, "y":0, "w":2},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":" {", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"|", "x":13.5, "y":1, "w":1.5},
{"x":15.25, "y":1},
{"x":16.25, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
{"x":15.25, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":2.25},
{"x":6, "y":4, "w":1.75},
{"x":7.75, "y":4, "w":2.25},
{"label":"Alt", "x":10, "y":4, "w":1.25},
{"label":"Win", "x":11.25, "y":4, "w":1.25},
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
{"x":14.25, "y":4},
{"x":15.25, "y":4},
{"x":16.25, "y":4}
]
},
"LAYOUT_split_space_and_backspace": {
"layout": [
{"label":"~", "x":0, "y":0},
{"label":"!", "x":1, "y":0},
{"label":"@", "x":2, "y":0},
{"label":"#", "x":3, "y":0},
{"label":"$", "x":4, "y":0},
{"label":"%", "x":5, "y":0},
{"label":"^", "x":6, "y":0},
{"label":"&", "x":7, "y":0},
{"label":"*", "x":8, "y":0},
{"label":"(", "x":9, "y":0},
{"label":")", "x":10, "y":0},
{"label":"_", "x":11, "y":0},
{"label":"+", "x":12, "y":0},
{"label":"Del", "x":13, "y":0},
{"label":"Backspace", "x":14, "y":0},
{"x":15.25, "y":0},
{"x":16.25, "y":0},
{"label":"Tab", "x":0, "y":1, "w":1.5},
{"label":"Q", "x":1.5, "y":1},
{"label":"W", "x":2.5, "y":1},
{"label":"E", "x":3.5, "y":1},
{"label":"R", "x":4.5, "y":1},
{"label":"T", "x":5.5, "y":1},
{"label":"Y", "x":6.5, "y":1},
{"label":"U", "x":7.5, "y":1},
{"label":"I", "x":8.5, "y":1},
{"label":"O", "x":9.5, "y":1},
{"label":"P", "x":10.5, "y":1},
{"label":" {", "x":11.5, "y":1},
{"label":"}", "x":12.5, "y":1},
{"label":"|", "x":13.5, "y":1, "w":1.5},
{"x":15.25, "y":1},
{"x":16.25, "y":1},
{"label":"Caps Lock", "x":0, "y":2, "w":1.75},
{"label":"A", "x":1.75, "y":2},
{"label":"S", "x":2.75, "y":2},
{"label":"D", "x":3.75, "y":2},
{"label":"F", "x":4.75, "y":2},
{"label":"G", "x":5.75, "y":2},
{"label":"H", "x":6.75, "y":2},
{"label":"J", "x":7.75, "y":2},
{"label":"K", "x":8.75, "y":2},
{"label":"L", "x":9.75, "y":2},
{"label":":", "x":10.75, "y":2},
{"label":"\"", "x":11.75, "y":2},
{"label":"Enter", "x":12.75, "y":2, "w":2.25},
{"label":"Shift", "x":0, "y":3, "w":2.25},
{"label":"Z", "x":2.25, "y":3},
{"label":"X", "x":3.25, "y":3},
{"label":"C", "x":4.25, "y":3},
{"label":"V", "x":5.25, "y":3},
{"label":"B", "x":6.25, "y":3},
{"label":"N", "x":7.25, "y":3},
{"label":"M", "x":8.25, "y":3},
{"label":"<", "x":9.25, "y":3},
{"label":">", "x":10.25, "y":3},
{"label":"?", "x":11.25, "y":3},
{"label":"Shift", "x":12.25, "y":3, "w":2.75},
{"x":15.25, "y":3},
{"label":"Ctrl", "x":0, "y":4, "w":1.25},
{"label":"Win", "x":1.25, "y":4, "w":1.25},
{"label":"Alt", "x":2.5, "y":4, "w":1.25},
{"x":3.75, "y":4, "w":2.25},
{"x":6, "y":4, "w":1.75},
{"x":7.75, "y":4, "w":2.25},
{"label":"Alt", "x":10, "y":4, "w":1.25},
{"label":"Win", "x":11.25, "y":4, "w":1.25},
{"label":"Menu", "x":12.5, "y":4, "w":1.25},
{"x":14.25, "y":4},
{"x":15.25, "y":4},
{"x":16.25, "y":4}
]
}
}
}

Some files were not shown because too many files have changed in this diff Show More