@ -0,0 +1,99 @@ | |||
* [Getting Started](README.md) | |||
* [QMK Introduction](getting_started_introduction.md) | |||
* [Install Build Tools](getting_started_build_tools.md) | |||
* Alternative: [Vagrant Guide](getting_started_vagrant.md) | |||
* [Build/Compile Instructions](getting_started_make_guide.md) | |||
* [Flashing Firmware](flashing.md) | |||
* [Contributing to QMK](contributing.md) | |||
* [How to Use Github](getting_started_github.md) | |||
* [Getting Help](getting_started_getting_help.md) | |||
* [Complete Newbs Guide](newbs.md) | |||
* [Getting Started](newbs_getting_started.md) | |||
* [Building Your First Firmware](newbs_building_firmware.md) | |||
* [Flashing Firmware](newbs_flashing.md) | |||
* [Testing and Debugging](newbs_testing_debugging.md) | |||
* [FAQ](faq.md) | |||
* [General FAQ](faq_general.md) | |||
* [Build/Compile QMK](faq_build.md) | |||
* [Debugging/Troubleshooting QMK](faq_debug.md) | |||
* [Keymap](faq_keymap.md) | |||
* [Hardware](hardware.md) | |||
* [Keyboard Guidelines](hardware_keyboard_guidelines.md) | |||
* [AVR Processors](hardware_avr.md) | |||
* ARM Processors (TBD) | |||
* [Drivers](hardware_drivers.md) | |||
* [Features](features.md) | |||
* [Advanced Keycodes](feature_advanced_keycodes.md) | |||
* [Audio](feature_audio.md) | |||
* [Auto Shift](feature_auto_shift.md) | |||
* [Backlight](feature_backlight.md) | |||
* [Bootmagic](feature_bootmagic.md) | |||
* [Command](feature_command.md) | |||
* [Dynamic Macros](feature_dynamic_macros.md) | |||
* [Grave Escape](feature_grave_esc.md) | |||
* [Key Lock](feature_key_lock.md) | |||
* [Layouts](feature_layouts.md) | |||
* [Leader Key](feature_leader_key.md) | |||
* [Macros](feature_macros.md) | |||
* [Mouse Keys](feature_mouse_keys.md) | |||
* [Pointing Device](feature_pointing_device.md) | |||
* [PS/2 Mouse](feature_ps2_mouse.md) | |||
* [RGB Lighting](feature_rgblight.md) | |||
* [Space Cadet Shift](feature_space_cadet.md) | |||
* [Space Cadet Shift Enter](feature_space_shift_cadet.md) | |||
* [Stenography](feature_stenography.md) | |||
* [Swap Hands](feature_swap_hands.md) | |||
* [Tap Dance](feature_tap_dance.md) | |||
* [Terminal](feature_terminal.md) | |||
* [Thermal Printer](feature_thermal_printer.md) | |||
* [Unicode](feature_unicode.md) | |||
* [Userspace](feature_userspace.md) | |||
* [Keycodes](keycodes.md) | |||
* [Backlight](feature_backlight.md#backlight-keycodes) | |||
* [Basic](keycodes_basic.md) | |||
* [Bluetooth](feature_bluetooth.md#bluetooth-keycodes) | |||
* [Bootmagic](feature_bootmagic.md#bootmagic-keycodes) | |||
* [Layer Switching](feature_advanced_keycodes.md#switching-and-toggling-layers) | |||
* [Mod+Key](feature_advanced_keycodes.md#modifier-keys) | |||
* [Mod Tap](feature_advanced_keycodes.md#mod-tap) | |||
* [One Shot Keys](feature_advanced_keycodes.md#one-shot-keys) | |||
* [Quantum](quantum_keycodes.md) | |||
* [RGB Light](feature_rgblight.md#rgblight-keycodes) | |||
* [Shifted Keys](feature_advanced_keycodes.md#shifted-keycodes) | |||
* [Stenography](feature_stenography.md#keycode-reference) | |||
* [Thermal Printer](feature_thermal_printer.md#thermal-printer-keycodes) | |||
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md) | |||
* Reference | |||
* [Config Options](config_options.md) | |||
* [Customizing Functionality](custom_quantum_functions.md) | |||
* [Documentation Best Practices](documentation_best_practices.md) | |||
* [Documentation Templates](documentation_templates.md) | |||
* [Glossary](reference_glossary.md) | |||
* [Keymap Overview](keymap.md) | |||
* [Unit Testing](unit_testing.md) | |||
* For Makers and Modders | |||
* [Hand Wiring Guide](hand_wire.md) | |||
* [ISP Flashing Guide](isp_flashing_guide.md) | |||
* For a Deeper Understanding | |||
* [How Keyboards Work](how_keyboards_work.md) | |||
* [Understanding QMK](understanding_qmk.md) | |||
* Other Topics | |||
* [Using Eclipse with QMK](eclipse.md) | |||
* QMK Internals (In Progress) | |||
* [Defines](internals_defines.md) | |||
* [Input Callback Reg](internals_input_callback_reg.md) | |||
* [Midi Device](internals_midi_device.md) | |||
* [Midi Device Setup Process](internals_midi_device_setup_process.md) | |||
* [Midi Util](internals_midi_util.md) | |||
* [Send Functions](internals_send_functions.md) | |||
* [Sysex Tools](internals_sysex_tools.md) |
@ -0,0 +1,143 @@ | |||
# RGB Matrix Lighting | |||
There is basic support for addressable RGB matrix lighting with the I2C IS31FL3731 RGB controller. To enable it, add this to your `rules.mk`: | |||
RGB_MATRIX_ENABLE = yes | |||
Configure the hardware via your `config.h`: | |||
// This is a 7-bit address, that gets left-shifted and bit 0 | |||
// set to 0 for write, 1 for read (as per I2C protocol) | |||
// The address will vary depending on your wiring: | |||
// 0b1110100 AD <-> GND | |||
// 0b1110111 AD <-> VCC | |||
// 0b1110101 AD <-> SCL | |||
// 0b1110110 AD <-> SDA | |||
#define DRIVER_ADDR_1 0b1110100 | |||
#define DRIVER_ADDR_2 0b1110110 | |||
#define DRIVER_COUNT 2 | |||
#define DRIVER_1_LED_TOTAL 25 | |||
#define DRIVER_2_LED_TOTAL 24 | |||
#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL | |||
Currently only 2 drivers are supported, but it would be trivial to support all 4 combinations. | |||
Define these arrays listing all the LEDs in your `<keyboard>.c`: | |||
const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { | |||
/* Refer to IS31 manual for these locations | |||
* driver | |||
* | R location | |||
* | | G location | |||
* | | | B location | |||
* | | | | */ | |||
{0, C1_3, C2_3, C3_3}, | |||
.... | |||
} | |||
Where `Cx_y` is the location of the LED in the matrix defined by [the datasheet](http://www.issi.com/WW/pdf/31FL3731.pdf). The `driver` is the index of the driver you defined in your `config.h` (`0` or `1` right now). | |||
const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { | |||
/* {row | col << 4} | |||
* | {x=0..224, y=0..64} | |||
* | | modifier | |||
* | | | */ | |||
{{0|(0<<4)}, {20.36*0, 21.33*0}, 1}, | |||
{{0|(1<<4)}, {20.36*1, 21.33*0}, 1}, | |||
.... | |||
} | |||
The format for the matrix position used in this array is `{row | (col << 4)}`. The `x` is between (inclusive) 0-224, and `y` is between (inclusive) 0-64. The easiest way to calculate these positions is: | |||
x = 224 / ( NUMBER_OF_ROWS - 1 ) * ROW_POSITION | |||
y = 64 / (NUMBER_OF_COLS - 1 ) * COL_POSITION | |||
Where all variables are decimels/floats. | |||
`modifier` is a boolean, whether or not a certain key is considered a modifier (used in some effects). | |||
## Keycodes | |||
All RGB keycodes are currently shared with the RGBLIGHT system: | |||
* `RGB_TOG` - toggle | |||
* `RGB_MOD` - cycle through modes | |||
* `RGB_HUI` - increase hue | |||
* `RGB_HUD` - decrease hue | |||
* `RGB_SAI` - increase saturation | |||
* `RGB_SAD` - decrease saturation | |||
* `RGB_VAI` - increase value | |||
* `RGB_VAD` - decrease value | |||
* `RGB_SPI` - increase speed effect (no EEPROM support) | |||
* `RGB_SPD` - decrease speed effect (no EEPROM support) | |||
* `RGB_MODE_*` keycodes will generally work, but are not currently mapped to the correct effects for the RGB Matrix system | |||
## RGB Matrix Effects | |||
These are the effects that are currently available: | |||
enum rgb_matrix_effects { | |||
RGB_MATRIX_SOLID_COLOR = 1, | |||
RGB_MATRIX_ALPHAS_MODS, | |||
RGB_MATRIX_DUAL_BEACON, | |||
RGB_MATRIX_GRADIENT_UP_DOWN, | |||
RGB_MATRIX_RAINDROPS, | |||
RGB_MATRIX_CYCLE_ALL, | |||
RGB_MATRIX_CYCLE_LEFT_RIGHT, | |||
RGB_MATRIX_CYCLE_UP_DOWN, | |||
RGB_MATRIX_RAINBOW_BEACON, | |||
RGB_MATRIX_RAINBOW_PINWHEELS, | |||
RGB_MATRIX_RAINBOW_MOVING_CHEVRON, | |||
RGB_MATRIX_JELLYBEAN_RAINDROPS, | |||
#ifdef RGB_MATRIX_KEYPRESSES | |||
RGB_MATRIX_SOLID_REACTIVE, | |||
RGB_MATRIX_SPLASH, | |||
RGB_MATRIX_MULTISPLASH, | |||
RGB_MATRIX_SOLID_SPLASH, | |||
RGB_MATRIX_SOLID_MULTISPLASH, | |||
#endif | |||
RGB_MATRIX_EFFECT_MAX | |||
}; | |||
## Custom layer effects | |||
Custom layer effects can be done by defining this in your `<keyboard>.c`: | |||
void rgb_matrix_indicators_kb(void) { | |||
// rgb_matrix_set_color(index, red, green, blue); | |||
} | |||
A similar function works in the keymap as `rgb_matrix_indicators_user`. | |||
## Additional `config.h` Options | |||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) | |||
#define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (not recommened) | |||
#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | |||
#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended | |||
#define RGB_MATRIX_SKIP_FRAMES 1 // number of frames to skip when displaying animations (0 is full effect) if not defined defaults to 1 | |||
## EEPROM storage | |||
The EEPROM for it is currently shared with the RGBLIGHT system (it's generally assumed only one RGB would be used at a time), but could be configured to use its own 32bit address with: | |||
#define EECONFIG_RGB_MATRIX (uint32_t *)16 | |||
Where `16` is an unused index from `eeconfig.h`. | |||
## Suspended state | |||
To use the suspend feature, add this to your `<keyboard>.c`: | |||
void suspend_power_down_kb(void) | |||
{ | |||
rgb_matrix_set_suspend_state(true); | |||
} | |||
void suspend_wakeup_init_kb(void) | |||
{ | |||
rgb_matrix_set_suspend_state(false); | |||
} |
@ -0,0 +1,45 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> | |||
<head> | |||
<meta charset="UTF-8"> | |||
<title>QMK Firmware</title> | |||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /> | |||
<meta name="description" content="Description"> | |||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> | |||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css" title="light"> | |||
<link rel="stylesheet" href="qmk.css" title="dark" disabled> | |||
</head> | |||
<body> | |||
<div id="app"></div> | |||
<script> | |||
window.$docsify = { | |||
name: 'QMK Firmware', | |||
nameLink: 'https://qmk.fm/', | |||
repo: 'qmk/qmk_firmware', | |||
loadSidebar: true, | |||
auto2top: true, | |||
formatUpdated: '{YYYY}/{MM}/{DD} {HH}:{mm}', | |||
search: { | |||
paths: 'auto', | |||
placeholder: 'Search Documentation...', | |||
noData: 'We could not find any documents matching your search.', | |||
depth: 6 | |||
} | |||
} | |||
</script> | |||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script> | |||
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script> | |||
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script> | |||
<script src="//unpkg.com/prismjs/components/prism-bash.min.js"></script> | |||
<script src="//unpkg.com/prismjs/components/prism-c.min.js"></script> | |||
<script src="//unpkg.com/prismjs/components/prism-cpp.min.js"></script> | |||
<script src="//unpkg.com/prismjs/components/prism-json.min.js"></script> | |||
<script src="//unpkg.com/prismjs/components/prism-makefile.min.js"></script> | |||
<script> | |||
// Register the offline cache worker | |||
if (typeof navigator.serviceWorker !== 'undefined') { | |||
navigator.serviceWorker.register('sw.js') | |||
} | |||
</script> | |||
</body> | |||
</html> |
@ -0,0 +1,862 @@ | |||
* { | |||
-webkit-font-smoothing: antialiased; | |||
-webkit-overflow-scrolling: touch; | |||
-webkit-tap-highlight-color: rgba(0,0,0,0); | |||
-webkit-text-size-adjust: none; | |||
-webkit-touch-callout: none; | |||
-webkit-box-sizing: border-box; | |||
box-sizing: border-box; | |||
} | |||
body:not(.ready) { | |||
overflow: hidden; | |||
} | |||
body:not(.ready) [data-cloak], | |||
body:not(.ready) .app-nav, | |||
body:not(.ready) > nav { | |||
display: none; | |||
} | |||
div#app { | |||
font-size: 30px; | |||
font-weight: lighter; | |||
margin: 40vh auto; | |||
text-align: center; | |||
} | |||
div#app:empty::before { | |||
content: 'Loading...'; | |||
} | |||
.emoji { | |||
height: 1.2rem; | |||
vertical-align: middle; | |||
} | |||
.progress { | |||
background-color: var(--theme-color, #ea6f5a); | |||
height: 2px; | |||
left: 0px; | |||
position: fixed; | |||
right: 0px; | |||
top: 0px; | |||
-webkit-transition: width 0.2s, opacity 0.4s; | |||
transition: width 0.2s, opacity 0.4s; | |||
width: 0%; | |||
z-index: 999999; | |||
} | |||
.search a:hover { | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
.search .search-keyword { | |||
color: var(--theme-color, #ea6f5a); | |||
font-style: normal; | |||
font-weight: bold; | |||
} | |||
html, | |||
body { | |||
height: 100%; | |||
} | |||
body { | |||
-moz-osx-font-smoothing: grayscale; | |||
-webkit-font-smoothing: antialiased; | |||
color: #efefef; | |||
font-family: 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; | |||
font-size: 15px; | |||
letter-spacing: 0; | |||
margin: 0; | |||
overflow-x: hidden; | |||
} | |||
img { | |||
max-width: 100%; | |||
} | |||
a[disabled] { | |||
cursor: not-allowed; | |||
opacity: 0.6; | |||
} | |||
kbd { | |||
border: solid 1px #ccc; | |||
border-radius: 3px; | |||
display: inline-block; | |||
font-size: 12px !important; | |||
line-height: 12px; | |||
margin-bottom: 3px; | |||
padding: 3px 5px; | |||
vertical-align: middle; | |||
} | |||
.task-list-item { | |||
list-style-type: none; | |||
} | |||
li input[type='checkbox'] { | |||
margin: 0 0.2em 0.25em -1.6em; | |||
vertical-align: middle; | |||
} | |||
.app-nav { | |||
margin: 25px 60px 0 0; | |||
position: absolute; | |||
right: 0; | |||
text-align: right; | |||
z-index: 10; | |||
/* navbar dropdown */ | |||
} | |||
.app-nav.no-badge { | |||
margin-right: 25px; | |||
} | |||
.app-nav p { | |||
margin: 0; | |||
} | |||
.app-nav > a { | |||
margin: 0 1rem; | |||
padding: 5px 0; | |||
} | |||
.app-nav ul, | |||
.app-nav li { | |||
display: inline-block; | |||
list-style: none; | |||
margin: 0; | |||
} | |||
.app-nav a { | |||
color: inherit; | |||
font-size: 16px; | |||
text-decoration: none; | |||
-webkit-transition: color 0.3s; | |||
transition: color 0.3s; | |||
} | |||
.app-nav a:hover { | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
.app-nav a.active { | |||
border-bottom: 2px solid var(--theme-color, #ea6f5a); | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
.app-nav li { | |||
display: inline-block; | |||
margin: 0 1rem; | |||
padding: 5px 0; | |||
position: relative; | |||
} | |||
.app-nav li ul { | |||
background-color: #fff; | |||
border: 1px solid #ddd; | |||
border-bottom-color: #ccc; | |||
border-radius: 4px; | |||
-webkit-box-sizing: border-box; | |||
box-sizing: border-box; | |||
display: none; | |||
max-height: calc(100vh - 61px); | |||
overflow-y: auto; | |||
padding: 10px 0; | |||
position: absolute; | |||
right: -15px; | |||
text-align: left; | |||
top: 100%; | |||
white-space: nowrap; | |||
} | |||
.app-nav li ul li { | |||
display: block; | |||
font-size: 14px; | |||
line-height: 1rem; | |||
margin: 0; | |||
margin: 8px 14px; | |||
white-space: nowrap; | |||
} | |||
.app-nav li ul a { | |||
display: block; | |||
font-size: inherit; | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.app-nav li ul a.active { | |||
border-bottom: 0; | |||
} | |||
.app-nav li:hover ul { | |||
display: block; | |||
} | |||
.github-corner { | |||
border-bottom: 0; | |||
position: fixed; | |||
right: 0; | |||
text-decoration: none; | |||
top: 0; | |||
z-index: 1; | |||
} | |||
.github-corner:hover .octo-arm { | |||
-webkit-animation: octocat-wave 560ms ease-in-out; | |||
animation: octocat-wave 560ms ease-in-out; | |||
} | |||
.github-corner svg { | |||
color: #3f3f3f; | |||
fill: var(--theme-color, #ea6f5a); | |||
height: 80px; | |||
width: 80px; | |||
} | |||
main { | |||
display: block; | |||
position: relative; | |||
width: 100vw; | |||
height: 100%; | |||
z-index: 0; | |||
} | |||
main.hidden { | |||
display: none; | |||
} | |||
.anchor { | |||
display: inline-block; | |||
text-decoration: none; | |||
-webkit-transition: all 0.3s; | |||
transition: all 0.3s; | |||
} | |||
.anchor span { | |||
color: #c8c8c8; | |||
} | |||
.anchor:hover { | |||
text-decoration: underline; | |||
} | |||
.sidebar { | |||
border-right: 1px solid rgba(0,0,0,0.07); | |||
overflow-y: auto; | |||
padding: 40px 0 0; | |||
position: absolute; | |||
top: 0; | |||
bottom: 0; | |||
left: 0; | |||
-webkit-transition: -webkit-transform 250ms ease-out; | |||
transition: -webkit-transform 250ms ease-out; | |||
transition: transform 250ms ease-out; | |||
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; | |||
width: 300px; | |||
z-index: 20; | |||
} | |||
.sidebar > h1 { | |||
margin: 0 auto 1rem; | |||
font-size: 1.5rem; | |||
font-weight: 300; | |||
text-align: center; | |||
} | |||
.sidebar > h1 a { | |||
color: inherit; | |||
text-decoration: none; | |||
} | |||
.sidebar > h1 .app-nav { | |||
display: block; | |||
position: static; | |||
} | |||
.sidebar .sidebar-nav { | |||
line-height: 2em; | |||
padding-bottom: 40px; | |||
} | |||
.sidebar li.collapse .app-sub-sidebar { | |||
display: none; | |||
} | |||
.sidebar ul { | |||
margin: 0; | |||
padding: 0; | |||
} | |||
.sidebar li > p { | |||
font-weight: 700; | |||
margin: 0; | |||
} | |||
.sidebar ul, | |||
.sidebar ul li { | |||
list-style: none; | |||
} | |||
.sidebar ul li a { | |||
border-bottom: none; | |||
display: block; | |||
} | |||
.sidebar ul li ul { | |||
padding-left: 20px; | |||
} | |||
.sidebar::-webkit-scrollbar { | |||
width: 4px; | |||
} | |||
.sidebar::-webkit-scrollbar-thumb { | |||
background: transparent; | |||
border-radius: 4px; | |||
} | |||
.sidebar:hover::-webkit-scrollbar-thumb { | |||
background: rgba(136,136,136,0.4); | |||
} | |||
.sidebar:hover::-webkit-scrollbar-track { | |||
background: rgba(136,136,136,0.1); | |||
} | |||
.sidebar-toggle { | |||
background-color: transparent; | |||
background-color: rgba(63,63,63,0.8); | |||
border: 0; | |||
outline: none; | |||
padding: 10px; | |||
position: absolute; | |||
bottom: 0; | |||
left: 0; | |||
text-align: center; | |||
-webkit-transition: opacity 0.3s; | |||
transition: opacity 0.3s; | |||
width: 284px; | |||
z-index: 30; | |||
} | |||
.sidebar-toggle .sidebar-toggle-button:hover { | |||
opacity: 0.4; | |||
} | |||
.sidebar-toggle span { | |||
background-color: var(--theme-color, #ea6f5a); | |||
display: block; | |||
margin-bottom: 4px; | |||
width: 16px; | |||
height: 2px; | |||
} | |||
body.sticky .sidebar, | |||
body.sticky .sidebar-toggle { | |||
position: fixed; | |||
} | |||
.content { | |||
padding-top: 60px; | |||
position: absolute; | |||
top: 0; | |||
right: 0; | |||
bottom: 0; | |||
left: 300px; | |||
-webkit-transition: left 250ms ease; | |||
transition: left 250ms ease; | |||
} | |||
.markdown-section { | |||
margin: 0 auto; | |||
max-width: 800px; | |||
padding: 30px 15px 40px 15px; | |||
position: relative; | |||
} | |||
.markdown-section > * { | |||
-webkit-box-sizing: border-box; | |||
box-sizing: border-box; | |||
font-size: inherit; | |||
} | |||
.markdown-section > :first-child { | |||
margin-top: 0 !important; | |||
} | |||
.markdown-section hr { | |||
border: none; | |||
border-bottom: 1px solid #eee; | |||
margin: 2em 0; | |||
} | |||
.markdown-section iframe { | |||
border: 1px solid #eee; | |||
} | |||
.markdown-section table { | |||
border-collapse: collapse; | |||
border-spacing: 0; | |||
display: block; | |||
margin-bottom: 1rem; | |||
overflow: auto; | |||
width: 100%; | |||
} | |||
.markdown-section th { | |||
border: 1px solid #ddd; | |||
font-weight: bold; | |||
padding: 6px 13px; | |||
} | |||
.markdown-section td { | |||
border: 1px solid #ddd; | |||
padding: 6px 13px; | |||
} | |||
.markdown-section tr { | |||
border-top: 1px solid #ccc; | |||
} | |||
.markdown-section tr:nth-child(2n) { | |||
background-color: #555555; | |||
} | |||
.markdown-section p.tip { | |||
background-color: #555555; | |||
border-bottom-right-radius: 2px; | |||
border-left: 4px solid #f66; | |||
border-top-right-radius: 2px; | |||
margin: 2em 0; | |||
padding: 12px 24px 12px 30px; | |||
position: relative; | |||
} | |||
.markdown-section p.tip:before { | |||
background-color: #f66; | |||
border-radius: 100%; | |||
color: #3f3f3f; | |||
content: '!'; | |||
font-family: 'Dosis', 'Source Sans Pro', 'Helvetica Neue', Arial, sans-serif; | |||
font-size: 14px; | |||
font-weight: bold; | |||
left: -12px; | |||
line-height: 20px; | |||
position: absolute; | |||
height: 20px; | |||
width: 20px; | |||
text-align: center; | |||
top: 14px; | |||
} | |||
.markdown-section p.tip code { | |||
background-color: #efefef; | |||
} | |||
.markdown-section p.tip em { | |||
color: #c8c8c8; | |||
} | |||
.markdown-section p.warn { | |||
background: rgba(234,111,90,0.1); | |||
border-radius: 2px; | |||
padding: 1rem; | |||
} | |||
body.close .sidebar { | |||
-webkit-transform: translateX(-300px); | |||
transform: translateX(-300px); | |||
} | |||
body.close .sidebar-toggle { | |||
width: auto; | |||
} | |||
body.close .content { | |||
left: 0; | |||
} | |||
@media print { | |||
.github-corner, | |||
.sidebar-toggle, | |||
.sidebar, | |||
.app-nav { | |||
display: none; | |||
} | |||
} | |||
@media screen and (max-width: 768px) { | |||
.github-corner, | |||
.sidebar-toggle, | |||
.sidebar { | |||
position: fixed; | |||
} | |||
.app-nav { | |||
margin-top: 16px; | |||
} | |||
.app-nav li ul { | |||
top: 30px; | |||
} | |||
main { | |||
height: auto; | |||
overflow-x: hidden; | |||
} | |||
.sidebar { | |||
left: -300px; | |||
-webkit-transition: -webkit-transform 250ms ease-out; | |||
transition: -webkit-transform 250ms ease-out; | |||
transition: transform 250ms ease-out; | |||
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; | |||
} | |||
.content { | |||
left: 0; | |||
max-width: 100vw; | |||
position: static; | |||
padding-top: 20px; | |||
-webkit-transition: -webkit-transform 250ms ease; | |||
transition: -webkit-transform 250ms ease; | |||
transition: transform 250ms ease; | |||
transition: transform 250ms ease, -webkit-transform 250ms ease; | |||
} | |||
.app-nav, | |||
.github-corner { | |||
-webkit-transition: -webkit-transform 250ms ease-out; | |||
transition: -webkit-transform 250ms ease-out; | |||
transition: transform 250ms ease-out; | |||
transition: transform 250ms ease-out, -webkit-transform 250ms ease-out; | |||
} | |||
.sidebar-toggle { | |||
background-color: transparent; | |||
width: auto; | |||
padding: 30px 30px 10px 10px; | |||
} | |||
body.close .sidebar { | |||
-webkit-transform: translateX(300px); | |||
transform: translateX(300px); | |||
} | |||
body.close .sidebar-toggle { | |||
background-color: rgba(63,63,63,0.8); | |||
-webkit-transition: 1s background-color; | |||
transition: 1s background-color; | |||
width: 284px; | |||
padding: 10px; | |||
} | |||
body.close .content { | |||
-webkit-transform: translateX(300px); | |||
transform: translateX(300px); | |||
} | |||
body.close .app-nav, | |||
body.close .github-corner { | |||
display: none; | |||
} | |||
.github-corner:hover .octo-arm { | |||
-webkit-animation: none; | |||
animation: none; | |||
} | |||
.github-corner .octo-arm { | |||
-webkit-animation: octocat-wave 560ms ease-in-out; | |||
animation: octocat-wave 560ms ease-in-out; | |||
} | |||
} | |||
@-webkit-keyframes octocat-wave { | |||
0%, 100% { | |||
-webkit-transform: rotate(0); | |||
transform: rotate(0); | |||
} | |||
20%, 60% { | |||
-webkit-transform: rotate(-25deg); | |||
transform: rotate(-25deg); | |||
} | |||
40%, 80% { | |||
-webkit-transform: rotate(10deg); | |||
transform: rotate(10deg); | |||
} | |||
} | |||
@keyframes octocat-wave { | |||
0%, 100% { | |||
-webkit-transform: rotate(0); | |||
transform: rotate(0); | |||
} | |||
20%, 60% { | |||
-webkit-transform: rotate(-25deg); | |||
transform: rotate(-25deg); | |||
} | |||
40%, 80% { | |||
-webkit-transform: rotate(10deg); | |||
transform: rotate(10deg); | |||
} | |||
} | |||
section.cover { | |||
-webkit-box-align: center; | |||
-ms-flex-align: center; | |||
align-items: center; | |||
background-position: center center; | |||
background-repeat: no-repeat; | |||
background-size: cover; | |||
height: 100vh; | |||
display: none; | |||
} | |||
section.cover.show { | |||
display: -webkit-box; | |||
display: -ms-flexbox; | |||
display: flex; | |||
} | |||
section.cover.has-mask .mask { | |||
background-color: #3f3f3f; | |||
opacity: 0.8; | |||
position: absolute; | |||
top: 0; | |||
height: 100%; | |||
width: 100%; | |||
} | |||
section.cover .cover-main { | |||
-webkit-box-flex: 1; | |||
-ms-flex: 1; | |||
flex: 1; | |||
margin: -20px 16px 0; | |||
text-align: center; | |||
z-index: 1; | |||
} | |||
section.cover a { | |||
color: inherit; | |||
text-decoration: none; | |||
} | |||
section.cover a:hover { | |||
text-decoration: none; | |||
} | |||
section.cover p { | |||
line-height: 1.5rem; | |||
margin: 1em 0; | |||
} | |||
section.cover h1 { | |||
color: inherit; | |||
font-size: 2.5rem; | |||
font-weight: 300; | |||
margin: 0.625rem 0 2.5rem; | |||
position: relative; | |||
text-align: center; | |||
} | |||
section.cover h1 a { | |||
display: block; | |||
} | |||
section.cover h1 small { | |||
bottom: -0.4375rem; | |||
font-size: 1rem; | |||
position: absolute; | |||
} | |||
section.cover blockquote { | |||
font-size: 1.5rem; | |||
text-align: center; | |||
} | |||
section.cover ul { | |||
line-height: 1.8; | |||
list-style-type: none; | |||
margin: 1em auto; | |||
max-width: 500px; | |||
padding: 0; | |||
} | |||
section.cover .cover-main > p:last-child a { | |||
border-color: var(--theme-color, #ea6f5a); | |||
border-radius: 2rem; | |||
border-style: solid; | |||
border-width: 1px; | |||
-webkit-box-sizing: border-box; | |||
box-sizing: border-box; | |||
color: var(--theme-color, #ea6f5a); | |||
display: inline-block; | |||
font-size: 1.05rem; | |||
letter-spacing: 0.1rem; | |||
margin: 0.5rem 1rem; | |||
padding: 0.75em 2rem; | |||
text-decoration: none; | |||
-webkit-transition: all 0.15s ease; | |||
transition: all 0.15s ease; | |||
} | |||
section.cover .cover-main > p:last-child a:last-child { | |||
background-color: var(--theme-color, #ea6f5a); | |||
color: #fff; | |||
} | |||
section.cover .cover-main > p:last-child a:last-child:hover { | |||
color: inherit; | |||
opacity: 0.8; | |||
} | |||
section.cover .cover-main > p:last-child a:hover { | |||
color: inherit; | |||
} | |||
section.cover blockquote > p > a { | |||
border-bottom: 2px solid var(--theme-color, #ea6f5a); | |||
-webkit-transition: color 0.3s; | |||
transition: color 0.3s; | |||
} | |||
section.cover blockquote > p > a:hover { | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
body { | |||
background-color: #3f3f3f; | |||
} | |||
/* sidebar */ | |||
.sidebar { | |||
background-color: #3f3f3f; | |||
color: #c8c8c8; | |||
} | |||
.sidebar li { | |||
margin: 6px 15px; | |||
} | |||
.sidebar ul li a { | |||
color: #c8c8c8; | |||
font-size: 14px; | |||
overflow: hidden; | |||
text-decoration: none; | |||
text-overflow: ellipsis; | |||
white-space: nowrap; | |||
} | |||
.sidebar ul li a:hover { | |||
text-decoration: underline; | |||
} | |||
.sidebar ul li ul { | |||
padding: 0; | |||
} | |||
.sidebar ul li.active > a { | |||
color: var(--theme-color, #ea6f5a); | |||
font-weight: 600; | |||
} | |||
/* markdown content found on pages */ | |||
.markdown-section h1, | |||
.markdown-section h2, | |||
.markdown-section h3, | |||
.markdown-section h4, | |||
.markdown-section strong { | |||
color: #657b83; | |||
font-weight: 600; | |||
} | |||
.markdown-section a { | |||
color: var(--theme-color, #ea6f5a); | |||
font-weight: 600; | |||
} | |||
.markdown-section h1 { | |||
font-size: 2rem; | |||
margin: 0 0 1rem; | |||
} | |||
.markdown-section h2 { | |||
font-size: 1.75rem; | |||
margin: 45px 0 0.8rem; | |||
} | |||
.markdown-section h3 { | |||
font-size: 1.5rem; | |||
margin: 40px 0 0.6rem; | |||
} | |||
.markdown-section h4 { | |||
font-size: 1.25rem; | |||
} | |||
.markdown-section h5 { | |||
font-size: 1rem; | |||
} | |||
.markdown-section h6 { | |||
color: #777; | |||
font-size: 1rem; | |||
} | |||
.markdown-section figure, | |||
.markdown-section p, | |||
.markdown-section ul, | |||
.markdown-section ol { | |||
margin: 1.2em 0; | |||
} | |||
.markdown-section p, | |||
.markdown-section ul, | |||
.markdown-section ol { | |||
line-height: 1.6rem; | |||
word-spacing: 0.05rem; | |||
} | |||
.markdown-section ul, | |||
.markdown-section ol { | |||
padding-left: 1.5rem; | |||
} | |||
.markdown-section blockquote { | |||
border-left: 4px solid var(--theme-color, #ea6f5a); | |||
color: #858585; | |||
margin: 2em 0; | |||
padding-left: 20px; | |||
} | |||
.markdown-section blockquote p { | |||
font-weight: 600; | |||
margin-left: 0; | |||
} | |||
.markdown-section iframe { | |||
margin: 1em 0; | |||
} | |||
.markdown-section em { | |||
color: #7f8c8d; | |||
} | |||
.markdown-section code { | |||
background-color: #282828; | |||
border-radius: 2px; | |||
color: #aaaaaa; | |||
font-family: 'Roboto Mono', Monaco, courier, monospace; | |||
font-size: 0.8rem; | |||
margin: 0 2px; | |||
padding: 3px 5px; | |||
white-space: pre-wrap; | |||
} | |||
.markdown-section pre { | |||
-moz-osx-font-smoothing: initial; | |||
-webkit-font-smoothing: initial; | |||
background-color: #282828; | |||
font-family: 'Roboto Mono', Monaco, courier, monospace; | |||
line-height: 1.5rem; | |||
margin: 1.2em 0; | |||
overflow: auto; | |||
padding: 0 1.4rem; | |||
position: relative; | |||
word-wrap: normal; | |||
} | |||
/* code highlight */ | |||
.token.comment, | |||
.token.prolog, | |||
.token.doctype, | |||
.token.cdata { | |||
color: #8e908c; | |||
} | |||
.token.namespace { | |||
opacity: 0.7; | |||
} | |||
.token.boolean, | |||
.token.number { | |||
color: #c76b29; | |||
} | |||
.token.punctuation { | |||
color: #525252; | |||
} | |||
.token.property { | |||
color: #c08b30; | |||
} | |||
.token.tag { | |||
color: #2973b7; | |||
} | |||
.token.string { | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
.token.selector { | |||
color: #6679cc; | |||
} | |||
.token.attr-name { | |||
color: #2973b7; | |||
} | |||
.token.entity, | |||
.token.url, | |||
.language-css .token.string, | |||
.style .token.string { | |||
color: #22a2c9; | |||
} | |||
.token.attr-value, | |||
.token.control, | |||
.token.directive, | |||
.token.unit { | |||
color: var(--theme-color, #ea6f5a); | |||
} | |||
.token.keyword { | |||
color: #e96900; | |||
} | |||
.token.statement, | |||
.token.regex, | |||
.token.atrule { | |||
color: #22a2c9; | |||
} | |||
.token.placeholder, | |||
.token.variable { | |||
color: #3d8fd1; | |||
} | |||
.token.deleted { | |||
text-decoration: line-through; | |||
} | |||
.token.inserted { | |||
border-bottom: 1px dotted #202746; | |||
text-decoration: none; | |||
} | |||
.token.italic { | |||
font-style: italic; | |||
} | |||
.token.important, | |||
.token.bold { | |||
font-weight: bold; | |||
} | |||
.token.important { | |||
color: #c94922; | |||
} | |||
.token.entity { | |||
cursor: help; | |||
} | |||
.markdown-section pre > code { | |||
-moz-osx-font-smoothing: initial; | |||
-webkit-font-smoothing: initial; | |||
background-color: #282828; | |||
border-radius: 2px; | |||
color: #657b83; | |||
display: block; | |||
font-family: 'Roboto Mono', Monaco, courier, monospace; | |||
font-size: 0.8rem; | |||
line-height: inherit; | |||
margin: 0 2px; | |||
max-width: inherit; | |||
overflow: inherit; | |||
padding: 2.2em 5px; | |||
white-space: inherit; | |||
} | |||
.markdown-section code::after, | |||
.markdown-section code::before { | |||
letter-spacing: 0.05rem; | |||
} | |||
code .token { | |||
-moz-osx-font-smoothing: initial; | |||
-webkit-font-smoothing: initial; | |||
min-height: 1.5rem; | |||
} | |||
pre::after { | |||
color: #ccc; | |||
content: attr(data-lang); | |||
font-size: 0.6rem; | |||
font-weight: 600; | |||
height: 15px; | |||
line-height: 15px; | |||
padding: 5px 10px 0; | |||
position: absolute; | |||
right: 0; | |||
text-align: right; | |||
top: 0; | |||
} | |||
.markdown-section p.tip { | |||
background-color: #282828; | |||
color: #657b83; | |||
} | |||
input[type='search'] { | |||
background: #4f4f4f; | |||
border-color: #4f4f4f; | |||
color: #c8c8c8; | |||
} |
@ -0,0 +1,83 @@ | |||
/* =========================================================== | |||
* docsify sw.js | |||
* =========================================================== | |||
* Copyright 2016 @huxpro | |||
* Licensed under Apache 2.0 | |||
* Register service worker. | |||
* ========================================================== */ | |||
const RUNTIME = 'docsify' | |||
const HOSTNAME_WHITELIST = [ | |||
self.location.hostname, | |||
'fonts.gstatic.com', | |||
'fonts.googleapis.com', | |||
'unpkg.com' | |||
] | |||
// The Util Function to hack URLs of intercepted requests | |||
const getFixedUrl = (req) => { | |||
var now = Date.now() | |||
var url = new URL(req.url) | |||
// 1. fixed http URL | |||
// Just keep syncing with location.protocol | |||
// fetch(httpURL) belongs to active mixed content. | |||
// And fetch(httpRequest) is not supported yet. | |||
url.protocol = self.location.protocol | |||
// 2. add query for caching-busting. | |||
// Github Pages served with Cache-Control: max-age=600 | |||
// max-age on mutable content is error-prone, with SW life of bugs can even extend. | |||
// Until cache mode of Fetch API landed, we have to workaround cache-busting with query string. | |||
// Cache-Control-Bug: https://bugs.chromium.org/p/chromium/issues/detail?id=453190 | |||
if (url.hostname === self.location.hostname) { | |||
url.search += (url.search ? '&' : '?') + 'cache-bust=' + now | |||
} | |||
return url.href | |||
} | |||
/** | |||
* @Lifecycle Activate | |||
* New one activated when old isnt being used. | |||
* | |||
* waitUntil(): activating ====> activated | |||
*/ | |||
self.addEventListener('activate', event => { | |||
event.waitUntil(self.clients.claim()) | |||
}) | |||
/** | |||
* @Functional Fetch | |||
* All network requests are being intercepted here. | |||
* | |||
* void respondWith(Promise<Response> r) | |||
*/ | |||
self.addEventListener('fetch', event => { | |||
// Skip some of cross-origin requests, like those for Google Analytics. | |||
if (HOSTNAME_WHITELIST.indexOf(new URL(event.request.url).hostname) > -1) { | |||
// Stale-while-revalidate | |||
// similar to HTTP's stale-while-revalidate: https://www.mnot.net/blog/2007/12/12/stale | |||
// Upgrade from Jake's to Surma's: https://gist.github.com/surma/eb441223daaedf880801ad80006389f1 | |||
const cached = caches.match(event.request) | |||
const fixedUrl = getFixedUrl(event.request) | |||
const fetched = fetch(fixedUrl, { cache: 'no-store' }) | |||
const fetchedCopy = fetched.then(resp => resp.clone()) | |||
// Call respondWith() with whatever we get first. | |||
// If the fetch fails (e.g disconnected), wait for the cache. | |||
// If there’s nothing in cache, wait for the fetch. | |||
// If neither yields a response, return offline pages. | |||
event.respondWith( | |||
Promise.race([fetched.catch(_ => cached), cached]) | |||
.then(resp => resp || fetched) | |||
.catch(_ => { /* eat any errors */ }) | |||
) | |||
// Update the cache with the version we fetched (only for ok status) | |||
event.waitUntil( | |||
Promise.all([fetchedCopy, caches.open(RUNTIME)]) | |||
.then(([response, cache]) => response.ok && cache.put(event.request, response)) | |||
.catch(_ => { /* eat any errors */ }) | |||
) | |||
} | |||
}) |
@ -0,0 +1,232 @@ | |||
/* | |||
* TWIlib.c | |||
* | |||
* Created: 6/01/2014 10:41:33 PM | |||
* Author: Chris Herring | |||
* http://www.chrisherring.net/all/tutorial-interrupt-driven-twi-interface-for-avr-part1/ | |||
*/ | |||
#include <avr/io.h> | |||
#include <avr/interrupt.h> | |||
#include "TWIlib.h" | |||
#include "util/delay.h" | |||
void TWIInit() | |||
{ | |||
TWIInfo.mode = Ready; | |||
TWIInfo.errorCode = 0xFF; | |||
TWIInfo.repStart = 0; | |||
// Set pre-scalers (no pre-scaling) | |||
TWSR = 0; | |||
// Set bit rate | |||
TWBR = ((F_CPU / TWI_FREQ) - 16) / 2; | |||
// Enable TWI and interrupt | |||
TWCR = (1 << TWIE) | (1 << TWEN); | |||
} | |||
uint8_t isTWIReady() | |||
{ | |||
if ( (TWIInfo.mode == Ready) | (TWIInfo.mode == RepeatedStartSent) ) | |||
{ | |||
return 1; | |||
} | |||
else | |||
{ | |||
return 0; | |||
} | |||
} | |||
uint8_t TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart) | |||
{ | |||
if (dataLen <= TXMAXBUFLEN) | |||
{ | |||
// Wait until ready | |||
while (!isTWIReady()) {_delay_us(1);} | |||
// Set repeated start mode | |||
TWIInfo.repStart = repStart; | |||
// Copy data into the transmit buffer | |||
uint8_t *data = (uint8_t *)TXdata; | |||
for (int i = 0; i < dataLen; i++) | |||
{ | |||
TWITransmitBuffer[i] = data[i]; | |||
} | |||
// Copy transmit info to global variables | |||
TXBuffLen = dataLen; | |||
TXBuffIndex = 0; | |||
// If a repeated start has been sent, then devices are already listening for an address | |||
// and another start does not need to be sent. | |||
if (TWIInfo.mode == RepeatedStartSent) | |||
{ | |||
TWIInfo.mode = Initializing; | |||
TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer | |||
TWISendTransmit(); // Send the data | |||
} | |||
else // Otherwise, just send the normal start signal to begin transmission. | |||
{ | |||
TWIInfo.mode = Initializing; | |||
TWISendStart(); | |||
} | |||
} | |||
else | |||
{ | |||
return 1; // return an error if data length is longer than buffer | |||
} | |||
return 0; | |||
} | |||
uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart) | |||
{ | |||
// Check if number of bytes to read can fit in the RXbuffer | |||
if (bytesToRead < RXMAXBUFLEN) | |||
{ | |||
// Reset buffer index and set RXBuffLen to the number of bytes to read | |||
RXBuffIndex = 0; | |||
RXBuffLen = bytesToRead; | |||
// Create the one value array for the address to be transmitted | |||
uint8_t TXdata[1]; | |||
// Shift the address and AND a 1 into the read write bit (set to write mode) | |||
TXdata[0] = (TWIaddr << 1) | 0x01; | |||
// Use the TWITransmitData function to initialize the transfer and address the slave | |||
TWITransmitData(TXdata, 1, repStart); | |||
} | |||
else | |||
{ | |||
return 0; | |||
} | |||
return 1; | |||
} | |||
ISR (TWI_vect) | |||
{ | |||
switch (TWI_STATUS) | |||
{ | |||
// ----\/ ---- MASTER TRANSMITTER OR WRITING ADDRESS ----\/ ---- // | |||
case TWI_MT_SLAW_ACK: // SLA+W transmitted and ACK received | |||
// Set mode to Master Transmitter | |||
TWIInfo.mode = MasterTransmitter; | |||
case TWI_START_SENT: // Start condition has been transmitted | |||
case TWI_MT_DATA_ACK: // Data byte has been transmitted, ACK received | |||
if (TXBuffIndex < TXBuffLen) // If there is more data to send | |||
{ | |||
TWDR = TWITransmitBuffer[TXBuffIndex++]; // Load data to transmit buffer | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
TWISendTransmit(); // Send the data | |||
} | |||
// This transmission is complete however do not release bus yet | |||
else if (TWIInfo.repStart) | |||
{ | |||
TWIInfo.errorCode = 0xFF; | |||
TWISendStart(); | |||
} | |||
// All transmissions are complete, exit | |||
else | |||
{ | |||
TWIInfo.mode = Ready; | |||
TWIInfo.errorCode = 0xFF; | |||
TWISendStop(); | |||
} | |||
break; | |||
// ----\/ ---- MASTER RECEIVER ----\/ ---- // | |||
case TWI_MR_SLAR_ACK: // SLA+R has been transmitted, ACK has been received | |||
// Switch to Master Receiver mode | |||
TWIInfo.mode = MasterReceiver; | |||
// If there is more than one byte to be read, receive data byte and return an ACK | |||
if (RXBuffIndex < RXBuffLen-1) | |||
{ | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
TWISendACK(); | |||
} | |||
// Otherwise when a data byte (the only data byte) is received, return NACK | |||
else | |||
{ | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
TWISendNACK(); | |||
} | |||
break; | |||
case TWI_MR_DATA_ACK: // Data has been received, ACK has been transmitted. | |||
/// -- HANDLE DATA BYTE --- /// | |||
TWIReceiveBuffer[RXBuffIndex++] = TWDR; | |||
// If there is more than one byte to be read, receive data byte and return an ACK | |||
if (RXBuffIndex < RXBuffLen-1) | |||
{ | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
TWISendACK(); | |||
} | |||
// Otherwise when a data byte (the only data byte) is received, return NACK | |||
else | |||
{ | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
TWISendNACK(); | |||
} | |||
break; | |||
case TWI_MR_DATA_NACK: // Data byte has been received, NACK has been transmitted. End of transmission. | |||
/// -- HANDLE DATA BYTE --- /// | |||
TWIReceiveBuffer[RXBuffIndex++] = TWDR; | |||
// This transmission is complete however do not release bus yet | |||
if (TWIInfo.repStart) | |||
{ | |||
TWIInfo.errorCode = 0xFF; | |||
TWISendStart(); | |||
} | |||
// All transmissions are complete, exit | |||
else | |||
{ | |||
TWIInfo.mode = Ready; | |||
TWIInfo.errorCode = 0xFF; | |||
TWISendStop(); | |||
} | |||
break; | |||
// ----\/ ---- MT and MR common ----\/ ---- // | |||
case TWI_MR_SLAR_NACK: // SLA+R transmitted, NACK received | |||
case TWI_MT_SLAW_NACK: // SLA+W transmitted, NACK received | |||
case TWI_MT_DATA_NACK: // Data byte has been transmitted, NACK received | |||
case TWI_LOST_ARBIT: // Arbitration has been lost | |||
// Return error and send stop and set mode to ready | |||
if (TWIInfo.repStart) | |||
{ | |||
TWIInfo.errorCode = TWI_STATUS; | |||
TWISendStart(); | |||
} | |||
// All transmissions are complete, exit | |||
else | |||
{ | |||
TWIInfo.mode = Ready; | |||
TWIInfo.errorCode = TWI_STATUS; | |||
TWISendStop(); | |||
} | |||
break; | |||
case TWI_REP_START_SENT: // Repeated start has been transmitted | |||
// Set the mode but DO NOT clear TWINT as the next data is not yet ready | |||
TWIInfo.mode = RepeatedStartSent; | |||
break; | |||
// ----\/ ---- SLAVE RECEIVER ----\/ ---- // | |||
// TODO IMPLEMENT SLAVE RECEIVER FUNCTIONALITY | |||
// ----\/ ---- SLAVE TRANSMITTER ----\/ ---- // | |||
// TODO IMPLEMENT SLAVE TRANSMITTER FUNCTIONALITY | |||
// ----\/ ---- MISCELLANEOUS STATES ----\/ ---- // | |||
case TWI_NO_RELEVANT_INFO: // It is not really possible to get into this ISR on this condition | |||
// Rather, it is there to be manually set between operations | |||
break; | |||
case TWI_ILLEGAL_START_STOP: // Illegal START/STOP, abort and return error | |||
TWIInfo.errorCode = TWI_ILLEGAL_START_STOP; | |||
TWIInfo.mode = Ready; | |||
TWISendStop(); | |||
break; | |||
} | |||
} |
@ -0,0 +1,82 @@ | |||
/* | |||
* TWIlib.h | |||
* | |||
* Created: 6/01/2014 10:38:42 PM | |||
* Author: Chris Herring | |||
* http://www.chrisherring.net/all/tutorial-interrupt-driven-twi-interface-for-avr-part1/ | |||
*/ | |||
#ifndef TWILIB_H_ | |||
#define TWILIB_H_ | |||
// TWI bit rate (was 100000) | |||
#define TWI_FREQ 400000 | |||
// Get TWI status | |||
#define TWI_STATUS (TWSR & 0xF8) | |||
// Transmit buffer length | |||
#define TXMAXBUFLEN 20 | |||
// Receive buffer length | |||
#define RXMAXBUFLEN 20 | |||
// Global transmit buffer | |||
uint8_t TWITransmitBuffer[TXMAXBUFLEN]; | |||
// Global receive buffer | |||
volatile uint8_t TWIReceiveBuffer[RXMAXBUFLEN]; | |||
// Buffer indexes | |||
volatile int TXBuffIndex; // Index of the transmit buffer. Is volatile, can change at any time. | |||
int RXBuffIndex; // Current index in the receive buffer | |||
// Buffer lengths | |||
int TXBuffLen; // The total length of the transmit buffer | |||
int RXBuffLen; // The total number of bytes to read (should be less than RXMAXBUFFLEN) | |||
typedef enum { | |||
Ready, | |||
Initializing, | |||
RepeatedStartSent, | |||
MasterTransmitter, | |||
MasterReceiver, | |||
SlaceTransmitter, | |||
SlaveReciever | |||
} TWIMode; | |||
typedef struct TWIInfoStruct{ | |||
TWIMode mode; | |||
uint8_t errorCode; | |||
uint8_t repStart; | |||
}TWIInfoStruct; | |||
TWIInfoStruct TWIInfo; | |||
// TWI Status Codes | |||
#define TWI_START_SENT 0x08 // Start sent | |||
#define TWI_REP_START_SENT 0x10 // Repeated Start sent | |||
// Master Transmitter Mode | |||
#define TWI_MT_SLAW_ACK 0x18 // SLA+W sent and ACK received | |||
#define TWI_MT_SLAW_NACK 0x20 // SLA+W sent and NACK received | |||
#define TWI_MT_DATA_ACK 0x28 // DATA sent and ACK received | |||
#define TWI_MT_DATA_NACK 0x30 // DATA sent and NACK received | |||
// Master Receiver Mode | |||
#define TWI_MR_SLAR_ACK 0x40 // SLA+R sent, ACK received | |||
#define TWI_MR_SLAR_NACK 0x48 // SLA+R sent, NACK received | |||
#define TWI_MR_DATA_ACK 0x50 // Data received, ACK returned | |||
#define TWI_MR_DATA_NACK 0x58 // Data received, NACK returned | |||
// Miscellaneous States | |||
#define TWI_LOST_ARBIT 0x38 // Arbitration has been lost | |||
#define TWI_NO_RELEVANT_INFO 0xF8 // No relevant information available | |||
#define TWI_ILLEGAL_START_STOP 0x00 // Illegal START or STOP condition has been detected | |||
#define TWI_SUCCESS 0xFF // Successful transfer, this state is impossible from TWSR as bit2 is 0 and read only | |||
#define TWISendStart() (TWCR = (1<<TWINT)|(1<<TWSTA)|(1<<TWEN)|(1<<TWIE)) // Send the START signal, enable interrupts and TWI, clear TWINT flag to resume transfer. | |||
#define TWISendStop() (TWCR = (1<<TWINT)|(1<<TWSTO)|(1<<TWEN)|(1<<TWIE)) // Send the STOP signal, enable interrupts and TWI, clear TWINT flag. | |||
#define TWISendTransmit() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // Used to resume a transfer, clear TWINT and ensure that TWI and interrupts are enabled. | |||
#define TWISendACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)|(1<<TWEA)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled and respond with an ACK if the device is addressed as a slave or after it receives a byte. | |||
#define TWISendNACK() (TWCR = (1<<TWINT)|(1<<TWEN)|(1<<TWIE)) // FOR MR mode. Resume a transfer, ensure that TWI and interrupts are enabled but DO NOT respond with an ACK if the device is addressed as a slave or after it receives a byte. | |||
// Function declarations | |||
uint8_t TWITransmitData(void *const TXdata, uint8_t dataLen, uint8_t repStart); | |||
void TWIInit(void); | |||
uint8_t TWIReadData(uint8_t TWIaddr, uint8_t bytesToRead, uint8_t repStart); | |||
uint8_t isTWIReady(void); | |||
#endif // TWICOMMS_H_ |
@ -0,0 +1,258 @@ | |||
/* Copyright 2017 Jason Williams | |||
* Copyright 2018 Jack Humbert | |||
* | |||
* 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 "is31fl3731.h" | |||
#include <avr/interrupt.h> | |||
#include <avr/io.h> | |||
#include <util/delay.h> | |||
#include <string.h> | |||
#include "TWIlib.h" | |||
#include "progmem.h" | |||
// This is a 7-bit address, that gets left-shifted and bit 0 | |||
// set to 0 for write, 1 for read (as per I2C protocol) | |||
// The address will vary depending on your wiring: | |||
// 0b1110100 AD <-> GND | |||
// 0b1110111 AD <-> VCC | |||
// 0b1110101 AD <-> SCL | |||
// 0b1110110 AD <-> SDA | |||
#define ISSI_ADDR_DEFAULT 0x74 | |||
#define ISSI_REG_CONFIG 0x00 | |||
#define ISSI_REG_CONFIG_PICTUREMODE 0x00 | |||
#define ISSI_REG_CONFIG_AUTOPLAYMODE 0x08 | |||
#define ISSI_REG_CONFIG_AUDIOPLAYMODE 0x18 | |||
#define ISSI_CONF_PICTUREMODE 0x00 | |||
#define ISSI_CONF_AUTOFRAMEMODE 0x04 | |||
#define ISSI_CONF_AUDIOMODE 0x08 | |||
#define ISSI_REG_PICTUREFRAME 0x01 | |||
#define ISSI_REG_SHUTDOWN 0x0A | |||
#define ISSI_REG_AUDIOSYNC 0x06 | |||
#define ISSI_COMMANDREGISTER 0xFD | |||
#define ISSI_BANK_FUNCTIONREG 0x0B // helpfully called 'page nine' | |||
// Transfer buffer for TWITransmitData() | |||
uint8_t g_twi_transfer_buffer[TXMAXBUFLEN]; | |||
// These buffers match the IS31FL3731 PWM registers 0x24-0xB3. | |||
// Storing them like this is optimal for I2C transfers to the registers. | |||
// We could optimize this and take out the unused registers from these | |||
// buffers and the transfers in IS31FL3731_write_pwm_buffer() but it's | |||
// probably not worth the extra complexity. | |||
uint8_t g_pwm_buffer[DRIVER_COUNT][144]; | |||
bool g_pwm_buffer_update_required = false; | |||
uint8_t g_led_control_registers[DRIVER_COUNT][18] = { { 0 }, { 0 } }; | |||
bool g_led_control_registers_update_required = false; | |||
// This is the bit pattern in the LED control registers | |||
// (for matrix A, add one to register for matrix B) | |||
// | |||
// reg - b7 b6 b5 b4 b3 b2 b1 b0 | |||
// 0x00 - R08,R07,R06,R05,R04,R03,R02,R01 | |||
// 0x02 - G08,G07,G06,G05,G04,G03,G02,R00 | |||
// 0x04 - B08,B07,B06,B05,B04,B03,G01,G00 | |||
// 0x06 - - , - , - , - , - ,B02,B01,B00 | |||
// 0x08 - - , - , - , - , - , - , - , - | |||
// 0x0A - B17,B16,B15, - , - , - , - , - | |||
// 0x0C - G17,G16,B14,B13,B12,B11,B10,B09 | |||
// 0x0E - R17,G15,G14,G13,G12,G11,G10,G09 | |||
// 0x10 - R16,R15,R14,R13,R12,R11,R10,R09 | |||
void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ) | |||
{ | |||
g_twi_transfer_buffer[0] = (addr << 1) | 0x00; | |||
g_twi_transfer_buffer[1] = reg; | |||
g_twi_transfer_buffer[2] = data; | |||
// Set the error code to have no relevant information | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
// Continuously attempt to transmit data until a successful transmission occurs | |||
//while ( TWIInfo.errorCode != 0xFF ) | |||
//{ | |||
TWITransmitData( g_twi_transfer_buffer, 3, 0 ); | |||
//} | |||
} | |||
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ) | |||
{ | |||
// assumes bank is already selected | |||
// transmit PWM registers in 9 transfers of 16 bytes | |||
// g_twi_transfer_buffer[] is 20 bytes | |||
// set the I2C address | |||
g_twi_transfer_buffer[0] = (addr << 1) | 0x00; | |||
// iterate over the pwm_buffer contents at 16 byte intervals | |||
for ( int i = 0; i < 144; i += 16 ) | |||
{ | |||
// set the first register, e.g. 0x24, 0x34, 0x44, etc. | |||
g_twi_transfer_buffer[1] = 0x24 + i; | |||
// copy the data from i to i+15 | |||
// device will auto-increment register for data after the first byte | |||
// thus this sets registers 0x24-0x33, 0x34-0x43, etc. in one transfer | |||
for ( int j = 0; j < 16; j++ ) | |||
{ | |||
g_twi_transfer_buffer[2 + j] = pwm_buffer[i + j]; | |||
} | |||
// Set the error code to have no relevant information | |||
TWIInfo.errorCode = TWI_NO_RELEVANT_INFO; | |||
// Continuously attempt to transmit data until a successful transmission occurs | |||
while ( TWIInfo.errorCode != 0xFF ) | |||
{ | |||
TWITransmitData( g_twi_transfer_buffer, 16 + 2, 0 ); | |||
} | |||
} | |||
} | |||
void IS31FL3731_init( uint8_t addr ) | |||
{ | |||
// In order to avoid the LEDs being driven with garbage data | |||
// in the LED driver's PWM registers, first enable software shutdown, | |||
// then set up the mode and other settings, clear the PWM registers, | |||
// then disable software shutdown. | |||
// select "function register" bank | |||
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); | |||
// enable software shutdown | |||
IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x00 ); | |||
// this delay was copied from other drivers, might not be needed | |||
_delay_ms( 10 ); | |||
// picture mode | |||
IS31FL3731_write_register( addr, ISSI_REG_CONFIG, ISSI_REG_CONFIG_PICTUREMODE ); | |||
// display frame 0 | |||
IS31FL3731_write_register( addr, ISSI_REG_PICTUREFRAME, 0x00 ); | |||
// audio sync off | |||
IS31FL3731_write_register( addr, ISSI_REG_AUDIOSYNC, 0x00 ); | |||
// select bank 0 | |||
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); | |||
// turn off all LEDs in the LED control register | |||
for ( int i = 0x00; i <= 0x11; i++ ) | |||
{ | |||
IS31FL3731_write_register( addr, i, 0x00 ); | |||
} | |||
// turn off all LEDs in the blink control register (not really needed) | |||
for ( int i = 0x12; i <= 0x23; i++ ) | |||
{ | |||
IS31FL3731_write_register( addr, i, 0x00 ); | |||
} | |||
// set PWM on all LEDs to 0 | |||
for ( int i = 0x24; i <= 0xB3; i++ ) | |||
{ | |||
IS31FL3731_write_register( addr, i, 0x00 ); | |||
} | |||
// select "function register" bank | |||
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, ISSI_BANK_FUNCTIONREG ); | |||
// disable software shutdown | |||
IS31FL3731_write_register( addr, ISSI_REG_SHUTDOWN, 0x01 ); | |||
// select bank 0 and leave it selected. | |||
// most usage after initialization is just writing PWM buffers in bank 0 | |||
// as there's not much point in double-buffering | |||
IS31FL3731_write_register( addr, ISSI_COMMANDREGISTER, 0 ); | |||
} | |||
void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ) | |||
{ | |||
if ( index >= 0 && index < DRIVER_LED_TOTAL ) { | |||
is31_led led = g_is31_leds[index]; | |||
// Subtract 0x24 to get the second index of g_pwm_buffer | |||
g_pwm_buffer[led.driver][led.r - 0x24] = red; | |||
g_pwm_buffer[led.driver][led.g - 0x24] = green; | |||
g_pwm_buffer[led.driver][led.b - 0x24] = blue; | |||
g_pwm_buffer_update_required = true; | |||
} | |||
} | |||
void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ) | |||
{ | |||
for ( int i = 0; i < DRIVER_LED_TOTAL; i++ ) | |||
{ | |||
IS31FL3731_set_color( i, red, green, blue ); | |||
} | |||
} | |||
void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ) | |||
{ | |||
is31_led led = g_is31_leds[index]; | |||
uint8_t control_register_r = (led.r - 0x24) / 8; | |||
uint8_t control_register_g = (led.g - 0x24) / 8; | |||
uint8_t control_register_b = (led.b - 0x24) / 8; | |||
uint8_t bit_r = (led.r - 0x24) % 8; | |||
uint8_t bit_g = (led.g - 0x24) % 8; | |||
uint8_t bit_b = (led.b - 0x24) % 8; | |||
if ( red ) { | |||
g_led_control_registers[led.driver][control_register_r] |= (1 << bit_r); | |||
} else { | |||
g_led_control_registers[led.driver][control_register_r] &= ~(1 << bit_r); | |||
} | |||
if ( green ) { | |||
g_led_control_registers[led.driver][control_register_g] |= (1 << bit_g); | |||
} else { | |||
g_led_control_registers[led.driver][control_register_g] &= ~(1 << bit_g); | |||
} | |||
if ( blue ) { | |||
g_led_control_registers[led.driver][control_register_b] |= (1 << bit_b); | |||
} else { | |||
g_led_control_registers[led.driver][control_register_b] &= ~(1 << bit_b); | |||
} | |||
g_led_control_registers_update_required = true; | |||
} | |||
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ) | |||
{ | |||
if ( g_pwm_buffer_update_required ) | |||
{ | |||
IS31FL3731_write_pwm_buffer( addr1, g_pwm_buffer[0] ); | |||
IS31FL3731_write_pwm_buffer( addr2, g_pwm_buffer[1] ); | |||
} | |||
g_pwm_buffer_update_required = false; | |||
} | |||
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ) | |||
{ | |||
if ( g_led_control_registers_update_required ) | |||
{ | |||
for ( int i=0; i<18; i++ ) | |||
{ | |||
IS31FL3731_write_register(addr1, i, g_led_control_registers[0][i] ); | |||
IS31FL3731_write_register(addr2, i, g_led_control_registers[1][i] ); | |||
} | |||
} | |||
} | |||
@ -0,0 +1,214 @@ | |||
/* Copyright 2017 Jason Williams | |||
* Copyright 2018 Jack Humbert | |||
* | |||
* 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 IS31FL3731_DRIVER_H | |||
#define IS31FL3731_DRIVER_H | |||
#include <stdint.h> | |||
#include <stdbool.h> | |||
typedef struct is31_led { | |||
uint8_t driver:2; | |||
uint8_t r; | |||
uint8_t g; | |||
uint8_t b; | |||
} __attribute__((packed)) is31_led; | |||
extern const is31_led g_is31_leds[DRIVER_LED_TOTAL]; | |||
void IS31FL3731_init( uint8_t addr ); | |||
void IS31FL3731_write_register( uint8_t addr, uint8_t reg, uint8_t data ); | |||
void IS31FL3731_write_pwm_buffer( uint8_t addr, uint8_t *pwm_buffer ); | |||
void IS31FL3731_set_color( int index, uint8_t red, uint8_t green, uint8_t blue ); | |||
void IS31FL3731_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); | |||
void IS31FL3731_set_led_control_register( uint8_t index, bool red, bool green, bool blue ); | |||
// This should not be called from an interrupt | |||
// (eg. from a timer interrupt). | |||
// Call this while idle (in between matrix scans). | |||
// If the buffer is dirty, it will update the driver with the buffer. | |||
void IS31FL3731_update_pwm_buffers( uint8_t addr1, uint8_t addr2 ); | |||
void IS31FL3731_update_led_control_registers( uint8_t addr1, uint8_t addr2 ); | |||
#define C1_1 0x24 | |||
#define C1_2 0x25 | |||
#define C1_3 0x26 | |||
#define C1_4 0x27 | |||
#define C1_5 0x28 | |||
#define C1_6 0x29 | |||
#define C1_7 0x2A | |||
#define C1_8 0x2B | |||
#define C1_9 0x2C | |||
#define C1_10 0x2D | |||
#define C1_11 0x2E | |||
#define C1_12 0x2F | |||
#define C1_13 0x30 | |||
#define C1_14 0x31 | |||
#define C1_15 0x32 | |||
#define C1_16 0x33 | |||
#define C2_1 0x34 | |||
#define C2_2 0x35 | |||
#define C2_3 0x36 | |||
#define C2_4 0x37 | |||
#define C2_5 0x38 | |||
#define C2_6 0x39 | |||
#define C2_7 0x3A | |||
#define C2_8 0x3B | |||
#define C2_9 0x3C | |||
#define C2_10 0x3D | |||
#define C2_11 0x3E | |||
#define C2_12 0x3F | |||
#define C2_13 0x40 | |||
#define C2_14 0x41 | |||
#define C2_15 0x42 | |||
#define C2_16 0x43 | |||
#define C3_1 0x44 | |||
#define C3_2 0x45 | |||
#define C3_3 0x46 | |||
#define C3_4 0x47 | |||
#define C3_5 0x48 | |||
#define C3_6 0x49 | |||
#define C3_7 0x4A | |||
#define C3_8 0x4B | |||
#define C3_9 0x4C | |||
#define C3_10 0x4D | |||
#define C3_11 0x4E | |||
#define C3_12 0x4F | |||
#define C3_13 0x50 | |||
#define C3_14 0x51 | |||
#define C3_15 0x52 | |||
#define C3_16 0x53 | |||
#define C4_1 0x54 | |||
#define C4_2 0x55 | |||
#define C4_3 0x56 | |||
#define C4_4 0x57 | |||
#define C4_5 0x58 | |||
#define C4_6 0x59 | |||
#define C4_7 0x5A | |||
#define C4_8 0x5B | |||
#define C4_9 0x5C | |||
#define C4_10 0x5D | |||
#define C4_11 0x5E | |||
#define C4_12 0x5F | |||
#define C4_13 0x60 | |||
#define C4_14 0x61 | |||
#define C4_15 0x62 | |||
#define C4_16 0x63 | |||
#define C5_1 0x64 | |||
#define C5_2 0x65 | |||
#define C5_3 0x66 | |||
#define C5_4 0x67 | |||
#define C5_5 0x68 | |||
#define C5_6 0x69 | |||
#define C5_7 0x6A | |||
#define C5_8 0x6B | |||
#define C5_9 0x6C | |||
#define C5_10 0x6D | |||
#define C5_11 0x6E | |||
#define C5_12 0x6F | |||
#define C5_13 0x70 | |||
#define C5_14 0x71 | |||
#define C5_15 0x72 | |||
#define C5_16 0x73 | |||
#define C6_1 0x74 | |||
#define C6_2 0x75 | |||
#define C6_3 0x76 | |||
#define C6_4 0x77 | |||
#define C6_5 0x78 | |||
#define C6_6 0x79 | |||
#define C6_7 0x7A | |||
#define C6_8 0x7B | |||
#define C6_9 0x7C | |||
#define C6_10 0x7D | |||
#define C6_11 0x7E | |||
#define C6_12 0x7F | |||
#define C6_13 0x80 | |||
#define C6_14 0x81 | |||
#define C6_15 0x82 | |||
#define C6_16 0x83 | |||
#define C7_1 0x84 | |||
#define C7_2 0x85 | |||
#define C7_3 0x86 | |||
#define C7_4 0x87 | |||
#define C7_5 0x88 | |||
#define C7_6 0x89 | |||
#define C7_7 0x8A | |||
#define C7_8 0x8B | |||
#define C7_9 0x8C | |||
#define C7_10 0x8D | |||
#define C7_11 0x8E | |||
#define C7_12 0x8F | |||
#define C7_13 0x90 | |||
#define C7_14 0x91 | |||
#define C7_15 0x92 | |||
#define C7_16 0x93 | |||
#define C8_1 0x94 | |||
#define C8_2 0x95 | |||
#define C8_3 0x96 | |||
#define C8_4 0x97 | |||
#define C8_5 0x98 | |||
#define C8_6 0x99 | |||
#define C8_7 0x9A | |||
#define C8_8 0x9B | |||
#define C8_9 0x9C | |||
#define C8_10 0x9D | |||
#define C8_11 0x9E | |||
#define C8_12 0x9F | |||
#define C8_13 0xA0 | |||
#define C8_14 0xA1 | |||
#define C8_15 0xA2 | |||
#define C8_16 0xA3 | |||
#define C9_1 0xA4 | |||
#define C9_2 0xA5 | |||
#define C9_3 0xA6 | |||
#define C9_4 0xA7 | |||
#define C9_5 0xA8 | |||
#define C9_6 0xA9 | |||
#define C9_7 0xAA | |||
#define C9_8 0xAB | |||
#define C9_9 0xAC | |||
#define C9_10 0xAD | |||
#define C9_11 0xAE | |||
#define C9_12 0xAF | |||
#define C9_13 0xB0 | |||
#define C9_14 0xB1 | |||
#define C9_15 0xB2 | |||
#define C9_16 0xB3 | |||
#endif // IS31FL3731_DRIVER_H |
@ -0,0 +1 @@ | |||
#include "alf_x2.h" |
@ -0,0 +1,98 @@ | |||
#ifndef ALF_X2_H | |||
#define ALF_X2_H | |||
#include "quantum.h" | |||
// K404 and K408 are the microswitches at the top of the PCB | |||
#define LAYOUT( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | |||
K400, K401, K403, K406, K410, K411, K412, K413, K414 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | |||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ | |||
} | |||
#define LAYOUT_std_ansi( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, \ | |||
K400, K401, K403, K406, K410, K411, K413, K414 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, KC_NO, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, KC_NO }, \ | |||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ | |||
} | |||
#define LAYOUT_std_splits( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ | |||
K400, K401, K403, K406, K410, K411, K413, K414 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ | |||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, K413, K414 } \ | |||
} | |||
#define LAYOUT_hhkb( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ | |||
K401, K403, K406, K410, K411 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ | |||
{ KC_NO, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ | |||
} | |||
#define LAYOUT_2u_split_arrows( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ | |||
K400, K401, K403, K406, K410, K411, K412, K413, K414 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ | |||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ | |||
} | |||
#define LAYOUT_split_arrows( \ | |||
K404, K408, \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ | |||
K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ | |||
K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ | |||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ | |||
K400, K401, K403, K406, K410, K411, K412, K413, K414 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ | |||
{ K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ | |||
{ K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ | |||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_N), K313, K314 }, \ | |||
{ K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ | |||
} | |||
#endif |
@ -0,0 +1,58 @@ | |||
#ifndef CONFIG_H | |||
#define CONFIG_H | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0x6060 | |||
#define DEVICE_VER 0x0001 | |||
#define MANUFACTURER ALF | |||
#define PRODUCT X2 | |||
#define DESCRIPTION ALF X2 60 | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 5 | |||
#define MATRIX_COLS 15 | |||
/* key matrix pins */ | |||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } | |||
#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } | |||
#define UNUSED_PINS | |||
/* COL2ROW or ROW2COL */ | |||
#define DIODE_DIRECTION COL2ROW | |||
/* number of backlight levels */ | |||
#define BACKLIGHT_PIN B6 | |||
#ifdef BACKLIGHT_PIN | |||
#define BACKLIGHT_LEVELS 3 | |||
#endif | |||
/* Set 0 if debouncing isn't needed */ | |||
#define DEBOUNCING_DELAY 5 | |||
/* 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 | |||
/* 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 | |||
#define RGB_DI_PIN E2 | |||
#ifdef RGB_DI_PIN | |||
#define RGBLIGHT_ANIMATIONS | |||
#define RGBLED_NUM 4 | |||
#define RGBLIGHT_HUE_STEP 8 | |||
#define RGBLIGHT_SAT_STEP 8 | |||
#define RGBLIGHT_VAL_STEP 8 | |||
#endif | |||
#endif |
@ -0,0 +1,32 @@ | |||
{ | |||
"keyboard_name": "ALF X2", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 15, | |||
"height": 6, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] | |||
}, | |||
"LAYOUT_std_ansi": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":2.75}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] | |||
}, | |||
"LAYOUT_std_splits": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.25}, {"label":"Win", "x":11.25, "y":5, "w":1.25}, {"label":"Menu", "x":12.5, "y":5, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":5, "w":1.25}] | |||
}, | |||
"LAYOUT_hhkb": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"x":14, "y":4}, {"label":"Win", "x":1.5, "y":5, "w":1.25}, {"label":"Alt", "x":2.75, "y":5, "w":1.5}, {"x":4.25, "y":5, "w":6.25}, {"label":"Alt", "x":10.5, "y":5, "w":1.5}, {"label":"Win", "x":12, "y":5, "w":1.25}] | |||
}, | |||
"LAYOUT_split_arrows": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4, "w":1.75}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] | |||
}, | |||
"LAYOUT_2u_split_arrows": { | |||
"layout": [{"x":1.5, "y":0}, {"x":2.5, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"label":"@", "x":2, "y":1}, {"label":"#", "x":3, "y":1}, {"label":"$", "x":4, "y":1}, {"label":"%", "x":5, "y":1}, {"label":"^", "x":6, "y":1}, {"label":"&", "x":7, "y":1}, {"label":"*", "x":8, "y":1}, {"label":"(", "x":9, "y":1}, {"label":")", "x":10, "y":1}, {"label":"_", "x":11, "y":1}, {"label":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Shift", "x":0, "y":4}, {"x":1, "y":4}, {"label":"Z", "x":2, "y":4}, {"label":"X", "x":3, "y":4}, {"label":"C", "x":4, "y":4}, {"label":"V", "x":5, "y":4}, {"label":"B", "x":6, "y":4}, {"label":"N", "x":7, "y":4}, {"label":"M", "x":8, "y":4}, {"label":"<", "x":9, "y":4}, {"label":">", "x":10, "y":4}, {"label":"?", "x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5}, {"label":"Win", "x":11, "y":5}, {"label":"Menu", "x":12, "y":5}, {"label":"Ctrl", "x":13, "y":5}, {"x":14, "y":5}] | |||
} | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
LAYOUT( | |||
KC_VOLU, KC_VOLD, | |||
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_NO, 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_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_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, KC_NO, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), | |||
LAYOUT( | |||
KC_MNXT, KC_MPRV, | |||
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_TRNS, KC_DEL, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, | |||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | |||
}; | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
return MACRO_NONE; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | |||
DDRB |= (1 << 2); PORTB &= ~(1 << 2); | |||
} else { | |||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); | |||
} | |||
} |
@ -0,0 +1,42 @@ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
LAYOUT( | |||
KC_VOLU, KC_VOLD, | |||
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_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_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_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, KC_RSFT, MO(1), | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_NO, KC_APP, KC_RCTL), | |||
LAYOUT( | |||
KC_MNXT, KC_MPRV, | |||
KC_NO, 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_INS, KC_DEL, | |||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, RESET, | |||
KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_DOWN, KC_TRNS, KC_TRNS, | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), | |||
}; | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
return MACRO_NONE; | |||
} | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
return true; | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | |||
DDRB |= (1 << 2); PORTB &= ~(1 << 2); | |||
} else { | |||
DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); | |||
} | |||
} |
@ -0,0 +1,15 @@ | |||
# ALF X2 | |||
![alf_x2](https://cdn.shopify.com/s/files/1/1674/0405/products/1_088c2862-1f68-4fdd-a346-965208c3a3de_1024x1024.png?v=1511296076) | |||
A customizable 60% keyboard. | |||
Keyboard Maintainer: QMK Community | |||
Hardware Supported: ALF X2 60% | |||
Hardware Availability: [zFrontier](https://en.zfrontier.com/products/group-buy-alf-x2-60) | |||
Make example for this keyboard (after setting up your build environment): | |||
make alf_x2:default | |||
See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. |
@ -0,0 +1,56 @@ | |||
# 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 | |||
# Boot Section Size in *bytes* | |||
OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# Build Options | |||
# comment out to disable the options. | |||
# | |||
BOOTMAGIC_ENABLE = yes # 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 = no # Commands for debug and configuration | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality | |||
AUDIO_ENABLE = no | |||
RGBLIGHT_ENABLE = yes |
@ -0,0 +1 @@ | |||
#include "alpha.h" |
@ -0,0 +1,16 @@ | |||
#ifndef KB_H | |||
#define KB_H | |||
#include "quantum.h" | |||
#define LAYOUT( \ | |||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, \ | |||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, \ | |||
K200, K201, K202, K203, K205, K207, K208, K209 \ | |||
) { \ | |||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \ | |||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \ | |||
{ K200, K201, K202, K203, KC_NO, K205, KC_NO, K207, K208, K209 } \ | |||
} | |||
#endif |
@ -0,0 +1,58 @@ | |||
#ifndef CONFIG_H | |||
#define CONFIG_H | |||
#include "config_common.h" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0x6060 | |||
#define DEVICE_VER 0x0001 | |||
#define MANUFACTURER PyroL | |||
#define PRODUCT alpha | |||
#define DESCRIPTION 28-key keyboard by PyroL | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 3 | |||
#define MATRIX_COLS 10 | |||
/* key matrix pins */ | |||
#define MATRIX_ROW_PINS { D4, B4, B5 } | |||
#define MATRIX_COL_PINS { D7, E6, C6, B6, B2, B3, B1, F7, F6, F5 } | |||
#define UNUSED_PINS | |||
/* COL2ROW or ROW2COL */ | |||
#define DIODE_DIRECTION COL2ROW | |||
/* number of backlight levels */ | |||
#ifdef BACKLIGHT_PIN | |||
#define BACKLIGHT_LEVELS 3 | |||
#endif | |||
/* Set 0 if debouncing isn't needed */ | |||
#define DEBOUNCING_DELAY 5 | |||
/* 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 | |||
/* 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 | |||
#define RGB_DI_PIN F4 | |||
#ifdef RGB_DI_PIN | |||
#define RGBLIGHT_ANIMATIONS | |||
#define RGBLED_NUM 5 | |||
#define RGBLIGHT_HUE_STEP 8 | |||
#define RGBLIGHT_SAT_STEP 8 | |||
#define RGBLIGHT_VAL_STEP 8 | |||
#endif | |||
#endif |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "Alpha", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 10, | |||
"height": 3, | |||
"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":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.5, "y":2}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2, "w":2}, {"x":6.5, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}] | |||
} | |||
} | |||
} |
@ -0,0 +1,76 @@ | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
LAYOUT( | |||
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, TO(1), | |||
KC_Z, KC_X, KC_C, KC_V, MT(MOD_LSFT, KC_SPC), KC_B, KC_N, KC_M), | |||
LAYOUT( | |||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | |||
KC_BSPC, KC_ESC, KC_TAB, KC_SCLN, KC_QUOT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(2), | |||
KC_LCTL, KC_LGUI, KC_LALT, TO(0), MT(MOD_LSFT, KC_ENT), KC_COMM, KC_DOT, KC_SLSH), | |||
LAYOUT( | |||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, | |||
KC_LSFT, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, TO(3), | |||
RGB_VAI, RGB_VAD, RGB_HUI, TO(0), RGB_MOD, KC_MPLY, KC_VOLD, KC_VOLU), | |||
LAYOUT( | |||
RESET, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | |||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, | |||
KC_NO, KC_NO, KC_NO, KC_NO, M(0), KC_NO, KC_NO, KC_NO), | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
if (record->event.pressed) { | |||
switch (keycode) { | |||
case 0: | |||
SEND_STRING("I'm so sorry... -PyroL"); | |||
return false; | |||
} | |||
} | |||
return true; | |||
}; | |||
void matrix_init_user(void) { | |||
} | |||
void matrix_scan_user(void) { | |||
} | |||
void led_set_user(uint8_t usb_led) { | |||
if (usb_led & (1 << USB_LED_NUM_LOCK)) { | |||
} else { | |||
} | |||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) { | |||
} else { | |||
} | |||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { | |||
} else { | |||
} | |||
if (usb_led & (1 << USB_LED_COMPOSE)) { | |||
} else { | |||
} | |||
if (usb_led & (1 << USB_LED_KANA)) { | |||
} else { | |||
} | |||
} |
@ -0,0 +1,17 @@ | |||
# Alpha | |||
![Alpha](https://i.imgur.com/J6EJ30N.jpg) | |||
A 28-key, semi-ortho keyboard designed by PyroL! | |||
Keyboard Maintainer: [PyroL](https://www.github.com/PyrooL) | |||
Hardware Supported: Alpha PCB, Pro Micro | |||
Hardware Availability: on a group-buy basis for now. Pro Micros can be found on Ali or from the official Sparkfun website. | |||
Make example for Alpha (after setting up your build environment): | |||
make alpha:default | |||
See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/faq/build-compile-qmk) for more information. |
@ -0,0 +1,56 @@ | |||
# 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 | |||
# Boot Section Size in *bytes* | |||
BOOTLOADER = caterina | |||
# Build Options | |||
# comment out to disable the options. | |||
# | |||
BOOTMAGIC_ENABLE = yes # 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 = no # Commands for debug and configuration | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
NKRO_ENABLE = yes # USB 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 | |||
AUDIO_ENABLE = no | |||
RGBLIGHT_ENABLE = yes |
@ -0,0 +1,28 @@ | |||
{ | |||
"keyboard_name": "alps64", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"width": 15, | |||
"height": 5, | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"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}, {"x":13, "y":0}, {"x":14, "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}, {"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":1.25}, {"x":1.25, "y":3}, {"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":1.75}, {"x":14, "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}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] | |||
}, | |||
"LAYOUT_standard_60": { | |||
"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}, {"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}, {"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}, {"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}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] | |||
}, | |||
"LAYOUT_infinity": { | |||
"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}, {"x":13, "y":0}, {"x":14, "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}, {"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":1.75}, {"x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"label":"Alt", "x":10, "y":4, "w":1.5}, {"label":"Win", "x":11.5, "y":4}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] | |||
}, | |||
"LAYOUT_aek_103": { | |||
"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}, {"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}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":6.5}, {"label":"Alt", "x":10.75, "y":4, "w":1.5}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] | |||
}, | |||
"LAYOUT_iso": { | |||
"layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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}, {"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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "x":1.25, "y":3}, {"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}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"AltGr", "x":11, "y":4, "w":1.5}, {"label":"Menu", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] | |||
} | |||
} | |||
} |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "AMJ40", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 12, | |||
"height": 4, | |||
"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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":11, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3, "w":1.25}, {"x":3.5, "y":3, "w":2.25}, {"x":5.75, "y":3, "w":2.75}, {"x":8.5, "y":3, "w":1.25}, {"x":9.75, "y":3}, {"x":10.75, "y":3, "w":1.25}] | |||
} | |||
} | |||
} |
@ -0,0 +1,43 @@ | |||
#include "amj40.h" | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
// Default Layer | |||
[0] = KEYMAP( \ | |||
KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ | |||
LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, KC_ENT),\ | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),\ | |||
KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3), KC_RCTL \ | |||
), | |||
// Number Layer | |||
[1] = KEYMAP( \ | |||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ | |||
KC_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, \ | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, MT(MOD_RSFT, KC_BSLS), \ | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ | |||
), | |||
// Shifted Layer | |||
[2] = KEYMAP( \ | |||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,\ | |||
KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, \ | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, \ | |||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ | |||
), | |||
// Fkey Layer | |||
[3] = KEYMAP( \ | |||
KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET,\ | |||
KC_TRNS, KC_F11, KC_F12, 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, TG(4), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ | |||
), | |||
// Gaming Layer | |||
[4] = KEYMAP( \ | |||
KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,\ | |||
KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, 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_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS\ | |||
), | |||
}; |
@ -0,0 +1,55 @@ | |||
Jetpacktuxedo's AMJ40 layout | |||
===================== | |||
This is based heavily on my minivan layout, with most difference stemming from the different widths between the minivan and the AMJ40. ![Image of my specific layout](https://i.imgur.com/B9XraJY.jpg) | |||
## Base Layer (0) | |||
The base layer is pretty simple, straight qwerty layout where available. Both spacebars go to layer 1 when held. `tab` is `tab` when pressed and `fn2` when held, `enter` is the same. `GESC` is `esc` when used alone, but `~` when shifted. `/` is `/` when tapped but `rshift` when held. | |||
``` | |||
|GESC| Q | W | E | R | T | Y | U | I | O | P |BSPC| | |||
| TAB | A | S | D | F | G | H | J | K | L | ENTER | | |||
|LSHIFT | Z | X | C | V | B | N | M | , | . | / | | |||
|LCTRL|LWIN|LALT | SPACE | SPACE |RALT |FN 3|RCTRL | | |||
``` | |||
## Number Layer (1) | |||
Numbers are set up just like on my minivan layout, but symbols are a bit different because the AMJ40 is one key narrower than the minivan and also lacks dedicated arrows. Decided to go with `hjkl` arrows, which takes some getting used to. `;` is on a layer now because of the narrowness I mentioned before, and it (along with `-`, `=`, and `'`) moves to the right hand to leave room for the `hjkl` arrows. `delete` on `backspace`, `[` and `]` on `<` and `>`, and `\` on `/` are all stolen straight from my minivan layout. | |||
``` | |||
| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |DEL | | |||
| | - | = | ; | ' | | ← | ↓ | ↑ | → | | | |||
| | | | | | | | | [ | ] | \ | | |||
| | | | | | | | | | |||
``` | |||
## Shifted Layer (2) | |||
I don't want to be using two key combos constantly, so I also added this symbol layer that is basically shift+numeric layer. Also has nav keys on top of where arrows sit on the previous layer | |||
``` | |||
| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) |DEL | | |||
| | _ | + | : | " | |HOME|PGDN|PGUP|END | | | |||
| | | | | | | | | { | } | | | | |||
| | | | | | | | | | |||
``` | |||
## Fkey Layer (3) | |||
Honestly, I use this more for jumping to my gaming layer and for reset than I use it for Fkeys. Lol. Hitting the left windows key while in this layer locks the gaming layer listed below | |||
``` | |||
| | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 |F10 |RSET| | |||
| |F11 |F12 | | | | | | | | | | |||
| | | | | | | | | | | | | |||
| |FN 4| | | | | | | | |||
``` | |||
## "Gaming" Layer (4) | |||
Based on the "gaming" layer on my minivan that I mostly just use for mouse keys. To toggle this back off you hit the right windows key (to go to layer 3) and then the left windows key again. | |||
``` | |||
|ESC | | | | | |MWUP|MLCK|M UP|MRCK| | | | |||
| TAB | | | | | |MWDN|M L |M DN|M R | | | |||
| | | | | | | | | | | | | |||
| | | | SPACE | | | | | | |||
``` | |||
@ -0,0 +1,27 @@ | |||
# 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 = yes # 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 | |||
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 = yes # Enable keyboard backlight functionality | |||
MIDI_ENABLE = no # MIDI controls | |||
AUDIO_ENABLE = no # Audio output on port C6 | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | |||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | |||
# Do not enable SLEEP_LED_ENABLE. It uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
#define ws2812_PORTREG PORTD | |||
#define ws2812_DDRREG DDRD | |||
ifndef QUANTUM_DIR | |||
include ../../../../Makefile | |||
endif |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "AMJ Pad", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 4, | |||
"height": 6, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}] | |||
} | |||
} | |||
} |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "Atom47", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 13, | |||
"height": 4, | |||
"layouts": { | |||
"LAYOUT_ansi": { | |||
"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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] | |||
} | |||
} | |||
} |
@ -1,4 +1,4 @@ | |||
#include "atom47.h" | |||
#include "rev1.h" | |||
#include "led.h" | |||
void matrix_init_kb(void) { |
@ -0,0 +1,2 @@ | |||
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) |
@ -1,31 +0,0 @@ | |||
#include "atom47.h" | |||
#include "led.h" | |||
void matrix_init_kb(void) { | |||
// put your keyboard start-up code here | |||
// runs once when the firmware starts up | |||
matrix_init_user(); | |||
led_init_ports(); | |||
}; | |||
void matrix_scan_kb(void) { | |||
// put your looping keyboard code here | |||
// runs every cycle (a lot) | |||
matrix_scan_user(); | |||
}; | |||
void led_init_ports(void) { | |||
// * Set our LED pins as output | |||
DDRB &= ~(1<<5); | |||
} | |||
void led_set_kb(uint8_t usb_led) { | |||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | |||
// Turn capslock on | |||
PORTF |= (1<<5); | |||
} else { | |||
// Turn capslock off | |||
PORTF &= ~(1<<5); | |||
} | |||
led_set_user(usb_led); | |||
} |
@ -1,25 +0,0 @@ | |||
#ifndef ATOM47_H | |||
#define ATOM47_H | |||
#include "quantum.h" | |||
// readability | |||
#define XXX KC_NO | |||
#define KEYMAP_ANSI( \ | |||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ | |||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ | |||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, \ | |||
k30, k31, k32, k33, k34, k36, k38, k39, k3a, k3c \ | |||
) \ | |||
{ \ | |||
{k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ | |||
{k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ | |||
{k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, XXX, k2c}, \ | |||
{k30, k31, k32, k33, k34, XXX, k36, XXX, k38, k39, k3a, XXX, k3c} \ | |||
} | |||
void matrix_init_user(void); | |||
void matrix_scan_user(void); | |||
#endif |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "Atom47", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 13, | |||
"height": 4, | |||
"layouts": { | |||
"LAYOUT_ansi": { | |||
"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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] | |||
} | |||
} | |||
} |
@ -1,39 +0,0 @@ | |||
#include "atom47.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 _MA 0 //Main layer | |||
#define _FN 1 //Fn | |||
#define _FN1 2 //Fn1 | |||
#define _PN 3 //Pn | |||
#define _______ KC_TRNS | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_MA] = KEYMAP_ANSI( | |||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, \ | |||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, \ | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), \ | |||
KC_LCTL, KC_LGUI, KC_LALT, MO(_PN), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTRL), \ | |||
[_FN] = KEYMAP_ANSI( | |||
_______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ | |||
KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ | |||
[_FN1] = KEYMAP_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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ | |||
_______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ | |||
[_PN] = KEYMAP_ANSI( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), | |||
}; |
@ -1 +0,0 @@ | |||
This is the default keymap as found on the Vortex Core, with some added buttons for backlight control. |
@ -1,4 +1,4 @@ | |||
#include "atom47.h" | |||
#include "rev2.h" | |||
#include "led.h" | |||
void matrix_init_kb(void) { |
@ -1,65 +1,3 @@ | |||
# MCU name | |||
#MCU = at90usb1287 | |||
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 | |||
# Boot Section Size in *bytes* | |||
# Teensy halfKay 512 | |||
# Teensy++ halfKay 1024 | |||
# Atmel DFU loader 4096 | |||
# LUFA bootloader 4096 | |||
# USBaspLoader 2048 | |||
OPT_DEFS += -DBOOTLOADER_SIZE=4096 | |||
# 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 | |||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
RGBLIGHT_ENABLE = no # Enable keyboard underlight functionality (+4870) | |||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) | |||
MIDI_ENABLE = no # MIDI controls | |||
AUDIO_ENABLE = no | |||
UNICODE_ENABLE = no # Unicode | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "Atomic", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 15, | |||
"height": 5, | |||
"layouts": { | |||
"LAYOUT_semi_standard": { | |||
"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":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":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "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":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2, "w":2}, {"x":14, "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":10, "y":3}, {"x":11, "y":3, "w":2}, {"x":13, "y":3}, {"x":14, "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}] | |||
} | |||
} | |||
} |
@ -1,36 +1,33 @@ | |||
#include "atomic.h" | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = { /* Colemak */ | |||
{ 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_NO }, | |||
{ KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL }, | |||
{ KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP }, | |||
{ KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, | |||
{ KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, | |||
}, | |||
[1] = { /* function */ | |||
{ 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_BSPC, KC_NO }, | |||
{ 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_SLEP, 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_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY }, | |||
{ KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT }, | |||
} | |||
[0] = LAYOUT_grid( /* Colemak */ | |||
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_NO , | |||
KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL , | |||
KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP, | |||
KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, | |||
), | |||
[1] = LAYOUT_grid( /* function */ | |||
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_BSPC, KC_NO , | |||
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_SLEP, 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_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY, | |||
KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT, | |||
), | |||
}; | |||
const uint16_t PROGMEM fn_actions[] = { | |||
[1] = ACTION_LAYER_MOMENTARY(1), | |||
[2] = ACTION_LAYER_MOMENTARY(1), | |||
[1] = ACTION_LAYER_MOMENTARY(1), | |||
[2] = ACTION_LAYER_MOMENTARY(1), | |||
}; | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
{ | |||
const macro_t * action_get_macro(keyrecord_t * record, uint8_t id, uint8_t opt) { | |||
// MACRODOWN only works in this function | |||
switch(id) { | |||
case 0: | |||
return MACRODOWN(TYPE(KC_T), END); | |||
switch (id) { | |||
case 0: | |||
return MACRODOWN(TYPE(KC_T), END); | |||
break; | |||
} | |||
return MACRO_NONE; | |||
} | |||
return MACRO_NONE; | |||
}; | |||
@ -1,183 +1,182 @@ | |||
#include "atomic.h" | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = { /* Dvorak */ | |||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
}, | |||
[1] = { /* Qwerty + F keys */ | |||
{ KC_ESC, 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_BSPC, KC_NO }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ 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_INS, KC_DEL }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
{ KC_ESC, 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_NO, KC_PGUP }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ 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_NO, KC_UP, KC_PGDN }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
}, | |||
[2] = { /* Numpad + qwerty shortcut keys */ | |||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
{ KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
{ KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }, | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
}, | |||
[0] = LAYOUT_grid( /* Dvorak */ | |||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_LCTL, MO(1), KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, MO(2), KC_LEFT, KC_DOWN, KC_RGHT , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
), | |||
[1] = LAYOUT_grid( /* Qwerty + F keys */ | |||
KC_ESC, 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_BSPC, KC_NO , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
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_INS, KC_DEL , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
KC_ESC, 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_NO, KC_PGUP , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
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_NO, KC_UP, KC_PGDN , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
), | |||
[2] = LAYOUT_grid( /* Numpad + qwerty shortcut keys */ | |||
{ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_0, KC_LBRC, KC_RBRC, KC_BSPC, KC_NO , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_P4, KC_P5, KC_P6, KC_L, KC_SLSH, KC_EQL, KC_INS, KC_DEL , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_P1, KC_P2, KC_P3, KC_S, KC_MINS, KC_ENT, KC_NO, KC_PGUP , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_X, KC_B, KC_P0, KC_P0, KC_PENT, KC_Z, KC_RSFT, KC_NO, KC_UP, KC_PGDN , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐ | |||
// │ X │ │ X │ | |||
// └─────────────────┘ └─────────────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
KC_LCTL, KC_TRNS, KC_NO, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_NO, KC_NO, KC_LGUI, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT , | |||
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐ | |||
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ | |||
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘ | |||
// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐ | |||
// │ X │ X │ X │ X │ X │ X │ X │ X │ X │ | |||
// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘ | |||
// ┌─ 2u ────────────┐ | |||
// │ X │ | |||
// └─────────────────┘ | |||
// ┌───────────────────── 6.25u ────────────────────────────┐ | |||
// │ X │ | |||
// └────────────────────────────────────────────────────────┘ | |||
// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐ | |||
// │ X │ X │ X │ X │ X │ X │ | |||
// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘ | |||
), | |||
}; | |||
const uint16_t PROGMEM fn_actions[] = { | |||
}; | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
{ | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
// MACRODOWN only works in this function | |||
switch(id) { | |||
case 0: | |||
return MACRODOWN(TYPE(KC_T), END); | |||
switch(id) { | |||
case 0: | |||
return MACRODOWN(TYPE(KC_T), END); | |||
break; | |||
} | |||
return MACRO_NONE; | |||
} | |||
return MACRO_NONE; | |||
}; |
@ -1,72 +1,68 @@ | |||
#include "atomic.h" | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE | |||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |||
* | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | | |||
* |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| | |||
* | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | | |||
* '--------------------------------------------------------------------------------------------------------------------------------------' | |||
*/ | |||
[0] = { /* QWERTY */ | |||
{ 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_DEL }, | |||
{ 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_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_RSFT, KC_UP, KC_PGDN }, | |||
{ M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT }, | |||
}, | |||
/* QWERTY - MIT ENHANCED / GRID COMPATIBLE | |||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |||
* | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |||
* | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |||
* | LCTRL1 | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |||
* | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | | |||
* |--------+--------+--------+--------+--------+- 6.25u ---------+--------+--------+--------+--------+-----------------+--------+--------| | |||
* | BRITE | LALT | FN | XXXXXX . SPACE | RCTRL | RALT | FN | LEFT | DOWN | RIGHT | | |||
* '--------------------------------------------------------------------------------------------------------------------------------------' | |||
*/ | |||
[0] = LAYOUT_grid( /* QWERTY */ | |||
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_DEL, | |||
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_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_RSFT, KC_UP, KC_PGDN, | |||
M(0), KC_ALT, MO(1), KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RCTL, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, | |||
), | |||
/* FUNCTION | |||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |||
* | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |||
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |||
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |||
* | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | | |||
* |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| | |||
* | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | | |||
* '--------------------------------------------------------------------------------------------------------------------------------------' | |||
*/ | |||
[1] = { /* FUNCTION LAYER*/ | |||
{ 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, ___T___, ___T___ }, | |||
{ KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR }, | |||
{ KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U }, | |||
{ KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D }, | |||
{ _______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R }, | |||
}, | |||
/* FUNCTION | |||
* .---------------------------------------------------------------------------------------------------------------------- 2u ------------. | |||
* | GRV | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| | |||
* | SCR LK | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | F21 | F22 | F23 | F24 | PAUSE | PR SCR | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| | |||
* | CAP LK | MS BT5 | MS BT4 | MS BT3 | MS BT2 | SLOW M | FAST M | NEXT | VOL+ | VOL- | PLAY | | XXXXXX . | WHEEL+ | | |||
* |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| | |||
* | NUM LK | | | | | | | | INSERT | END1 | HOME | XXXXXX . | MOUS U | WHEEL- | | |||
* |--------+--------+--------+--------+--------+- 6.25 ------------+--------+--------+------+--------+-----------------+--------+--------| | |||
* | | | FN | XXXXXX . MS BT1 | | | FN | MOUS L | MOUS D | MOUS R | | |||
* '--------------------------------------------------------------------------------------------------------------------------------------' | |||
*/ | |||
[1] = LAYOUT_grid( /* FUNCTION LAYER*/ | |||
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, ___T___, ___T___, | |||
KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_PAUS, KC_PSCR, | |||
KC_CAPS, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, KC_ACL0, KC_ACL2, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, _______, ___T___, ___T___, KC_WH_U, | |||
KC_NLCK, _______, _______, _______, _______, _______, _______, _______, KC_INSERT, KC_END, KC_HOME, ___T___, ___T___, KC_MS_U, KC_WH_D, | |||
_______, _______, MO(1), _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, MO(1), KC_MS_L, KC_MS_D, KC_MS_R, | |||
), | |||
}; | |||
const uint16_t PROGMEM fn_actions[] = { | |||
[1] = ACTION_LAYER_MOMENTARY(1), | |||
[2] = ACTION_LAYER_MOMENTARY(1), | |||
[1] = ACTION_LAYER_MOMENTARY(1), | |||
[2] = ACTION_LAYER_MOMENTARY(1), | |||
}; | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | |||
{ | |||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { | |||
// MACRODOWN only works in this function | |||
switch(id) { | |||
case 0: | |||
if (record->event.pressed) { | |||
register_code(KC_RSFT); | |||
#ifdef BACKLIGHT_ENABLE | |||
backlight_step(); | |||
#endif | |||
} else { | |||
unregister_code(KC_RSFT); | |||
} | |||
break; | |||
switch(id) { | |||
case 0: | |||
if (record->event.pressed) { | |||
register_code(KC_RSFT); | |||
#ifdef BACKLIGHT_ENABLE | |||
backlight_step(); | |||
#endif | |||
} else { | |||
unregister_code(KC_RSFT); | |||
} | |||
return MACRO_NONE; | |||
break; | |||
} | |||
return MACRO_NONE; | |||
}; |
@ -0,0 +1,13 @@ | |||
{ | |||
"keyboard_name": "Atreus", | |||
"url": "", | |||
"maintainer": "qmk", | |||
"bootloader": "", | |||
"width": 12.5, | |||
"height": 4.6, | |||
"layouts": { | |||
"LAYOUT": { | |||
"layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "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, "h":1.5}, {"x":6.5, "y":3, "h":1.5}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}] | |||
} | |||
} | |||
} |