mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-08-26 17:01:41 +00:00
Compare commits
23 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
bbea9dadbc | ||
![]() |
81756d7b21 | ||
![]() |
c5c112ae29 | ||
![]() |
3d7bfae232 | ||
![]() |
b666921e25 | ||
![]() |
b4f4576631 | ||
![]() |
60797c8439 | ||
![]() |
3d9fda3629 | ||
![]() |
ffa119941c | ||
![]() |
ffa5c48430 | ||
![]() |
a69b610456 | ||
![]() |
2ba6b9ab69 | ||
![]() |
5d5fa0dc8c | ||
![]() |
2fe2c323c6 | ||
![]() |
72fa2cf2fc | ||
![]() |
3468f2f4c7 | ||
![]() |
4de809535a | ||
![]() |
e954dfcf8c | ||
![]() |
c7b8e45ba1 | ||
![]() |
d9619be499 | ||
![]() |
b7cbae8d1f | ||
![]() |
f5ebfdabcd | ||
![]() |
ed98250e62 |
@@ -197,6 +197,12 @@ ifeq ($(strip $(USB_HID_ENABLE)), yes)
|
||||
include $(TMK_DIR)/protocol/usb_hid.mk
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(strip $(HD44780_ENABLE)), yes)
|
||||
SRC += drivers/avr/hd44780.c
|
||||
OPT_DEFS += -DHD44780_ENABLE
|
||||
endif
|
||||
|
||||
QUANTUM_SRC:= \
|
||||
$(QUANTUM_DIR)/quantum.c \
|
||||
$(QUANTUM_DIR)/keymap_common.c \
|
||||
|
56
docs/feature_hd44780.md
Normal file
56
docs/feature_hd44780.md
Normal file
@@ -0,0 +1,56 @@
|
||||
# HD44780 LCD Displays
|
||||
|
||||
This is an integration of Peter Fleury's LCD library. This page will explain the basics. [For in depth documentation visit his page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
||||
|
||||
You can enable support for HD44780 Displays by setting the `HD44780_ENABLE` flag in your keyboards `rules.mk` to yes. This will use about 400 KB of extra space.
|
||||
|
||||
## Configuration
|
||||
|
||||
You will need to configure the pins used by your display and its number of lines and collumn in your keyboards `config.h`.
|
||||
|
||||
Uncomment the section labled HD44780 and change the parameters as needed.
|
||||
````
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
````
|
||||
|
||||
Should you need to configure other properties you can copy them from `quantum/hd44780.h` and set them in your `config.h`
|
||||
|
||||
## Usage
|
||||
|
||||
To initialize your display call lcd_init() with one of these parameters:
|
||||
````
|
||||
LCD_DISP_OFF : display off
|
||||
LCD_DISP_ON : display on, cursor off
|
||||
LCD_DISP_ON_CURSOR : display on, cursor on
|
||||
LCD_DISP_ON_CURSOR_BLINK : display on, cursor on flashing
|
||||
````
|
||||
This is best done in your keyboards `matrix_init_kb` or your keymaps `matrix_init_user`.
|
||||
It is advised to clear the display before use.
|
||||
To do so call `lcd_clrsrc()`.
|
||||
|
||||
To now print something to your Display you first call `lcd_gotoxy(column, line)`. To go to the start of the first line you would call `lcd_gotoxy(0, 0)` and then print a string with `lcd_puts("example string")`.
|
||||
|
||||
There are more posible methods to control the display. [For in depth documentation please visit the linked page.](http://homepage.hispeed.ch/peterfleury/doxygen/avr-gcc-libraries/group__pfleury__lcd.html)
|
@@ -9,6 +9,7 @@ QMK has a staggering number of features for building your keyboard. It can take
|
||||
* [Backlight](feature_backlight.md) - LED lighting support for your keyboard.
|
||||
* [Bootmagic](feature_bootmagic.md) - Adjust the behavior of your keyboard using hotkeys.
|
||||
* [Dynamic Macros](feature_dynamic_macros.md) - Record and playback macros from the keyboard itself.
|
||||
* [HD44780 LCD Display](feature_hd44780.md) - Support for LCD character displays using the HD44780 standard.
|
||||
* [Key Lock](feature_key_lock.md) - Lock a key in the "down" state.
|
||||
* [Layouts](feature_layouts.md) - Use one keymap with any keyboard that supports your layout.
|
||||
* [Leader Key](feature_leader_key.md) - Tap the leader key followed by a sequence to trigger custom behavior.
|
||||
|
@@ -6,12 +6,16 @@ This page attempts to explain the basic information you need to know to work wit
|
||||
|
||||
QMK is a fork of [Jun Wako](https://github.com/tmk)'s [tmk_keyboard](https://github.com/tmk/tmk_keyboard) project. The original TMK code, with modifications, can be found in the `tmk` folder. The QMK additions to the project may be found in the `quantum` folder. Keyboard projects may be found in the `handwired` and `keyboard` folders.
|
||||
|
||||
### Userspace Structure
|
||||
|
||||
Within the folder `users` is a directory for each user. This is a place for users to put code that they might use between keyboards. See the docs for [Userspace feature](feature_userspace.md) for more information.
|
||||
|
||||
### Keyboard Project Structure
|
||||
|
||||
Within the folder `keyboards` and its subfolder `handwired` is a directory for each keyboard project, for example `qmk_firmware/keyboards/clueboard`. Within it you'll find the following structure:
|
||||
|
||||
* `keymaps/`: Different keymaps that can be built
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `Makefile`
|
||||
* `rules.mk`: The file that sets the default "make" options. Do not edit this file directly, instead use a keymap specific `rules.mk`.
|
||||
* `config.h`: The file that sets the default compile time options. Do not edit this file directly, instead use a keymap specific `config.h`.
|
||||
|
||||
### Keymap Structure
|
||||
@@ -25,23 +29,26 @@ In every keymap folder, the following files may be found. Only `keymap.c` is req
|
||||
|
||||
# The `config.h` File
|
||||
|
||||
There are 2 `config.h` locations:
|
||||
There are 3 possible `config.h` locations:
|
||||
|
||||
* keyboard (`/keyboards/<keyboard>/config.h`)
|
||||
* userspace (`/users/<user>/config.h`)
|
||||
* keymap (`/keyboards/<keyboard>/keymaps/<keymap>/config.h`)
|
||||
|
||||
If the keymap `config.h` exists, that file is included by the build system and the keyboard `config.h` is not included. If you wish to override settings in your keymap's `config.h` you will need to include some glue code:
|
||||
The build system automatically picks up the config files in the above order. If you wish to override any setting set by a previous `config.h` you will need to first include some boilerplate code for the settings you wish to change.
|
||||
|
||||
```
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
#pragma once
|
||||
```
|
||||
|
||||
If you want to override a setting from the parent `config.h` file, you need to `#undef` and then `#define` the setting again, like this:
|
||||
Then to override a setting from the previous `config.h` file you must `#undef` and then `#define` the setting again.
|
||||
|
||||
```c
|
||||
The boilerplate code and setting look like this together:
|
||||
|
||||
```
|
||||
#pragma once
|
||||
|
||||
// overrides go here!
|
||||
#undef MY_SETTING
|
||||
#define MY_SETTING 4
|
||||
```
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# The Compelete Newbs Guide To QMK
|
||||
# The Complete Newbs Guide To QMK
|
||||
|
||||
QMK is a powerful Open Source firmware for your mechanical keyboard. You can use QMK to customize your keyboard in ways both simple and powerful. People of all skill levels, from complete newbie to master programmer, have successfully used QMK to customize their keyboard. This guide will help you do the same, no matter your skill level.
|
||||
|
||||
@@ -12,5 +12,7 @@ There are 4 main sections to this guide:
|
||||
* [Building Your First Firmware](newbs_building_firmware.md)
|
||||
* [Flashing Firmware](newbs_flashing.md)
|
||||
* [Testing and Debugging](newbs_testing_debugging.md)
|
||||
* [Learn More with these Resources](newbs_learn_more_resources.md)
|
||||
|
||||
This guide is focused on helping someone who has never compiled software before. It makes choices and recommendations based on that viewpoint. There are alternative methods for many of these procedures, and we support most of those alternatives. If you have any doubt about how to accomplish a task you can [ask us for guidance](getting_started_getting_help.md).
|
||||
|
||||
|
13
docs/newbs_learn_more_resources.md
Normal file
13
docs/newbs_learn_more_resources.md
Normal file
@@ -0,0 +1,13 @@
|
||||
# Learning Resources
|
||||
These resources are aimed at giving new members in the qmk community more understanding to the information provided in the newbs docs.
|
||||
|
||||
Git resources:
|
||||
*
|
||||
*[Great General Tutorial](https://www.codecademy.com/learn/learn-git)
|
||||
*[Git Game To Learn From Examples](https://learngitbranching.js.org/)
|
||||
*[Git Resources to Learn More About Github](getting_started_github.md)
|
||||
*[Git Resources Aimed Specificly toward QMK](contributing.md)
|
||||
|
||||
|
||||
Command Line resources:
|
||||
*[Good General Tutorial on Command Line](https://www.codecademy.com/learn/learn-the-command-line)
|
592
drivers/avr/hd44780.c
Normal file
592
drivers/avr/hd44780.c
Normal file
@@ -0,0 +1,592 @@
|
||||
/****************************************************************************
|
||||
Title: HD44780U LCD library
|
||||
Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury
|
||||
License: GNU General Public License Version 3
|
||||
File: $Id: lcd.c,v 1.15.2.2 2015/01/17 12:16:05 peter Exp $
|
||||
Software: AVR-GCC 3.3
|
||||
Target: any AVR device, memory mapped mode only for AT90S4414/8515/Mega
|
||||
|
||||
DESCRIPTION
|
||||
Basic routines for interfacing a HD44780U-based text lcd display
|
||||
|
||||
Originally based on Volker Oth's lcd library,
|
||||
changed lcd_init(), added additional constants for lcd_command(),
|
||||
added 4-bit I/O mode, improved and optimized code.
|
||||
|
||||
Library can be operated in memory mapped mode (LCD_IO_MODE=0) or in
|
||||
4-bit IO port mode (LCD_IO_MODE=1). 8-bit IO port mode not supported.
|
||||
|
||||
Memory mapped mode compatible with Kanda STK200, but supports also
|
||||
generation of R/W signal through A8 address line.
|
||||
|
||||
USAGE
|
||||
See the C include lcd.h file for a description of each function
|
||||
|
||||
*****************************************************************************/
|
||||
#include <inttypes.h>
|
||||
#include <avr/io.h>
|
||||
#include <avr/pgmspace.h>
|
||||
#include <util/delay.h>
|
||||
#include "hd44780.h"
|
||||
|
||||
/*
|
||||
** constants/macros
|
||||
*/
|
||||
#define DDR(x) (*(&x - 1)) /* address of data direction register of port x */
|
||||
#if defined(__AVR_ATmega64__) || defined(__AVR_ATmega128__)
|
||||
/* on ATmega64/128 PINF is on port 0x00 and not 0x60 */
|
||||
#define PIN(x) ( &PORTF==&(x) ? _SFR_IO8(0x00) : (*(&x - 2)) )
|
||||
#else
|
||||
#define PIN(x) (*(&x - 2)) /* address of input register of port x */
|
||||
#endif
|
||||
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define lcd_e_delay() _delay_us(LCD_DELAY_ENABLE_PULSE)
|
||||
#define lcd_e_high() LCD_E_PORT |= _BV(LCD_E_PIN);
|
||||
#define lcd_e_low() LCD_E_PORT &= ~_BV(LCD_E_PIN);
|
||||
#define lcd_e_toggle() toggle_e()
|
||||
#define lcd_rw_high() LCD_RW_PORT |= _BV(LCD_RW_PIN)
|
||||
#define lcd_rw_low() LCD_RW_PORT &= ~_BV(LCD_RW_PIN)
|
||||
#define lcd_rs_high() LCD_RS_PORT |= _BV(LCD_RS_PIN)
|
||||
#define lcd_rs_low() LCD_RS_PORT &= ~_BV(LCD_RS_PIN)
|
||||
#endif
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#if LCD_LINES==1
|
||||
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_1LINE
|
||||
#else
|
||||
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_4BIT_2LINES
|
||||
#endif
|
||||
#else
|
||||
#if LCD_LINES==1
|
||||
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_1LINE
|
||||
#else
|
||||
#define LCD_FUNCTION_DEFAULT LCD_FUNCTION_8BIT_2LINES
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LCD_CONTROLLER_KS0073
|
||||
#if LCD_LINES==4
|
||||
|
||||
#define KS0073_EXTENDED_FUNCTION_REGISTER_ON 0x2C /* |0|010|1100 4-bit mode, extension-bit RE = 1 */
|
||||
#define KS0073_EXTENDED_FUNCTION_REGISTER_OFF 0x28 /* |0|010|1000 4-bit mode, extension-bit RE = 0 */
|
||||
#define KS0073_4LINES_MODE 0x09 /* |0|000|1001 4 lines mode */
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
** function prototypes
|
||||
*/
|
||||
#if LCD_IO_MODE
|
||||
static void toggle_e(void);
|
||||
#endif
|
||||
|
||||
/*
|
||||
** local functions
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
delay for a minimum of <us> microseconds
|
||||
the number of loops is calculated at compile-time from MCU clock frequency
|
||||
*************************************************************************/
|
||||
#define delay(us) _delay_us(us)
|
||||
|
||||
|
||||
#if LCD_IO_MODE
|
||||
/* toggle Enable Pin to initiate write */
|
||||
static void toggle_e(void)
|
||||
{
|
||||
lcd_e_high();
|
||||
lcd_e_delay();
|
||||
lcd_e_low();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Low-level function to write byte to LCD controller
|
||||
Input: data byte to write to LCD
|
||||
rs 1: write data
|
||||
0: write instruction
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
#if LCD_IO_MODE
|
||||
static void lcd_write(uint8_t data,uint8_t rs)
|
||||
{
|
||||
unsigned char dataBits ;
|
||||
|
||||
|
||||
if (rs) { /* write data (RS=1, RW=0) */
|
||||
lcd_rs_high();
|
||||
} else { /* write instruction (RS=0, RW=0) */
|
||||
lcd_rs_low();
|
||||
}
|
||||
lcd_rw_low(); /* RW=0 write mode */
|
||||
|
||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||
&& (LCD_DATA0_PIN == 0) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||
{
|
||||
/* configure data pins as output */
|
||||
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||
|
||||
/* output high nibble first */
|
||||
dataBits = LCD_DATA0_PORT & 0xF0;
|
||||
LCD_DATA0_PORT = dataBits |((data>>4)&0x0F);
|
||||
lcd_e_toggle();
|
||||
|
||||
/* output low nibble */
|
||||
LCD_DATA0_PORT = dataBits | (data&0x0F);
|
||||
lcd_e_toggle();
|
||||
|
||||
/* all data pins high (inactive) */
|
||||
LCD_DATA0_PORT = dataBits | 0x0F;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* configure data pins as output */
|
||||
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
||||
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
||||
DDR(LCD_DATA2_PORT) |= _BV(LCD_DATA2_PIN);
|
||||
DDR(LCD_DATA3_PORT) |= _BV(LCD_DATA3_PIN);
|
||||
|
||||
/* output high nibble first */
|
||||
LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN);
|
||||
LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN);
|
||||
LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN);
|
||||
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN);
|
||||
if(data & 0x80) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||
if(data & 0x40) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||
if(data & 0x20) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||
if(data & 0x10) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||
lcd_e_toggle();
|
||||
|
||||
/* output low nibble */
|
||||
LCD_DATA3_PORT &= ~_BV(LCD_DATA3_PIN);
|
||||
LCD_DATA2_PORT &= ~_BV(LCD_DATA2_PIN);
|
||||
LCD_DATA1_PORT &= ~_BV(LCD_DATA1_PIN);
|
||||
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN);
|
||||
if(data & 0x08) LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||
if(data & 0x04) LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||
if(data & 0x02) LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||
if(data & 0x01) LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||
lcd_e_toggle();
|
||||
|
||||
/* all data pins high (inactive) */
|
||||
LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN);
|
||||
LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN);
|
||||
LCD_DATA2_PORT |= _BV(LCD_DATA2_PIN);
|
||||
LCD_DATA3_PORT |= _BV(LCD_DATA3_PIN);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#define lcd_write(d,rs) if (rs) *(volatile uint8_t*)(LCD_IO_DATA) = d; else *(volatile uint8_t*)(LCD_IO_FUNCTION) = d;
|
||||
/* rs==0 -> write instruction to LCD_IO_FUNCTION */
|
||||
/* rs==1 -> write data to LCD_IO_DATA */
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Low-level function to read byte from LCD controller
|
||||
Input: rs 1: read data
|
||||
0: read busy flag / address counter
|
||||
Returns: byte read from LCD controller
|
||||
*************************************************************************/
|
||||
#if LCD_IO_MODE
|
||||
static uint8_t lcd_read(uint8_t rs)
|
||||
{
|
||||
uint8_t data;
|
||||
|
||||
|
||||
if (rs)
|
||||
lcd_rs_high(); /* RS=1: read data */
|
||||
else
|
||||
lcd_rs_low(); /* RS=0: read busy flag */
|
||||
lcd_rw_high(); /* RW=1 read mode */
|
||||
|
||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||
&& ( LCD_DATA0_PIN == 0 )&& (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||
{
|
||||
DDR(LCD_DATA0_PORT) &= 0xF0; /* configure data pins as input */
|
||||
|
||||
lcd_e_high();
|
||||
lcd_e_delay();
|
||||
data = PIN(LCD_DATA0_PORT) << 4; /* read high nibble first */
|
||||
lcd_e_low();
|
||||
|
||||
lcd_e_delay(); /* Enable 500ns low */
|
||||
|
||||
lcd_e_high();
|
||||
lcd_e_delay();
|
||||
data |= PIN(LCD_DATA0_PORT)&0x0F; /* read low nibble */
|
||||
lcd_e_low();
|
||||
}
|
||||
else
|
||||
{
|
||||
/* configure data pins as input */
|
||||
DDR(LCD_DATA0_PORT) &= ~_BV(LCD_DATA0_PIN);
|
||||
DDR(LCD_DATA1_PORT) &= ~_BV(LCD_DATA1_PIN);
|
||||
DDR(LCD_DATA2_PORT) &= ~_BV(LCD_DATA2_PIN);
|
||||
DDR(LCD_DATA3_PORT) &= ~_BV(LCD_DATA3_PIN);
|
||||
|
||||
/* read high nibble first */
|
||||
lcd_e_high();
|
||||
lcd_e_delay();
|
||||
data = 0;
|
||||
if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x10;
|
||||
if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x20;
|
||||
if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x40;
|
||||
if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x80;
|
||||
lcd_e_low();
|
||||
|
||||
lcd_e_delay(); /* Enable 500ns low */
|
||||
|
||||
/* read low nibble */
|
||||
lcd_e_high();
|
||||
lcd_e_delay();
|
||||
if ( PIN(LCD_DATA0_PORT) & _BV(LCD_DATA0_PIN) ) data |= 0x01;
|
||||
if ( PIN(LCD_DATA1_PORT) & _BV(LCD_DATA1_PIN) ) data |= 0x02;
|
||||
if ( PIN(LCD_DATA2_PORT) & _BV(LCD_DATA2_PIN) ) data |= 0x04;
|
||||
if ( PIN(LCD_DATA3_PORT) & _BV(LCD_DATA3_PIN) ) data |= 0x08;
|
||||
lcd_e_low();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
#else
|
||||
#define lcd_read(rs) (rs) ? *(volatile uint8_t*)(LCD_IO_DATA+LCD_IO_READ) : *(volatile uint8_t*)(LCD_IO_FUNCTION+LCD_IO_READ)
|
||||
/* rs==0 -> read instruction from LCD_IO_FUNCTION */
|
||||
/* rs==1 -> read data from LCD_IO_DATA */
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
loops while lcd is busy, returns address counter
|
||||
*************************************************************************/
|
||||
static uint8_t lcd_waitbusy(void)
|
||||
|
||||
{
|
||||
register uint8_t c;
|
||||
|
||||
/* wait until busy flag is cleared */
|
||||
while ( (c=lcd_read(0)) & (1<<LCD_BUSY)) {}
|
||||
|
||||
/* the address counter is updated 4us after the busy flag is cleared */
|
||||
delay(LCD_DELAY_BUSY_FLAG);
|
||||
|
||||
/* now read the address counter */
|
||||
return (lcd_read(0)); // return address counter
|
||||
|
||||
}/* lcd_waitbusy */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Move cursor to the start of next line or to the first line if the cursor
|
||||
is already on the last line.
|
||||
*************************************************************************/
|
||||
static inline void lcd_newline(uint8_t pos)
|
||||
{
|
||||
register uint8_t addressCounter;
|
||||
|
||||
|
||||
#if LCD_LINES==1
|
||||
addressCounter = 0;
|
||||
#endif
|
||||
#if LCD_LINES==2
|
||||
if ( pos < (LCD_START_LINE2) )
|
||||
addressCounter = LCD_START_LINE2;
|
||||
else
|
||||
addressCounter = LCD_START_LINE1;
|
||||
#endif
|
||||
#if LCD_LINES==4
|
||||
#if KS0073_4LINES_MODE
|
||||
if ( pos < LCD_START_LINE2 )
|
||||
addressCounter = LCD_START_LINE2;
|
||||
else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE3) )
|
||||
addressCounter = LCD_START_LINE3;
|
||||
else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE4) )
|
||||
addressCounter = LCD_START_LINE4;
|
||||
else
|
||||
addressCounter = LCD_START_LINE1;
|
||||
#else
|
||||
if ( pos < LCD_START_LINE3 )
|
||||
addressCounter = LCD_START_LINE2;
|
||||
else if ( (pos >= LCD_START_LINE2) && (pos < LCD_START_LINE4) )
|
||||
addressCounter = LCD_START_LINE3;
|
||||
else if ( (pos >= LCD_START_LINE3) && (pos < LCD_START_LINE2) )
|
||||
addressCounter = LCD_START_LINE4;
|
||||
else
|
||||
addressCounter = LCD_START_LINE1;
|
||||
#endif
|
||||
#endif
|
||||
lcd_command((1<<LCD_DDRAM)+addressCounter);
|
||||
|
||||
}/* lcd_newline */
|
||||
|
||||
|
||||
/*
|
||||
** PUBLIC FUNCTIONS
|
||||
*/
|
||||
|
||||
/*************************************************************************
|
||||
Send LCD controller instruction command
|
||||
Input: instruction to send to LCD controller, see HD44780 data sheet
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_command(uint8_t cmd)
|
||||
{
|
||||
lcd_waitbusy();
|
||||
lcd_write(cmd,0);
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Send data byte to LCD controller
|
||||
Input: data to send to LCD controller, see HD44780 data sheet
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_data(uint8_t data)
|
||||
{
|
||||
lcd_waitbusy();
|
||||
lcd_write(data,1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Set cursor to specified position
|
||||
Input: x horizontal position (0: left most position)
|
||||
y vertical position (0: first line)
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_gotoxy(uint8_t x, uint8_t y)
|
||||
{
|
||||
#if LCD_LINES==1
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||
#endif
|
||||
#if LCD_LINES==2
|
||||
if ( y==0 )
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||
else
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE2+x);
|
||||
#endif
|
||||
#if LCD_LINES==4
|
||||
if ( y==0 )
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE1+x);
|
||||
else if ( y==1)
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE2+x);
|
||||
else if ( y==2)
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE3+x);
|
||||
else /* y==3 */
|
||||
lcd_command((1<<LCD_DDRAM)+LCD_START_LINE4+x);
|
||||
#endif
|
||||
|
||||
}/* lcd_gotoxy */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
*************************************************************************/
|
||||
int lcd_getxy(void)
|
||||
{
|
||||
return lcd_waitbusy();
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Clear display and set cursor to home position
|
||||
*************************************************************************/
|
||||
void lcd_clrscr(void)
|
||||
{
|
||||
lcd_command(1<<LCD_CLR);
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Set cursor to home position
|
||||
*************************************************************************/
|
||||
void lcd_home(void)
|
||||
{
|
||||
lcd_command(1<<LCD_HOME);
|
||||
}
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Display character at current cursor position
|
||||
Input: character to be displayed
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_putc(char c)
|
||||
{
|
||||
uint8_t pos;
|
||||
|
||||
|
||||
pos = lcd_waitbusy(); // read busy-flag and address counter
|
||||
if (c=='\n')
|
||||
{
|
||||
lcd_newline(pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
#if LCD_WRAP_LINES==1
|
||||
#if LCD_LINES==1
|
||||
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||
}
|
||||
#elif LCD_LINES==2
|
||||
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE2,0);
|
||||
}else if ( pos == LCD_START_LINE2+LCD_DISP_LENGTH ){
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||
}
|
||||
#elif LCD_LINES==4
|
||||
if ( pos == LCD_START_LINE1+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE2,0);
|
||||
}else if ( pos == LCD_START_LINE2+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE3,0);
|
||||
}else if ( pos == LCD_START_LINE3+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE4,0);
|
||||
}else if ( pos == LCD_START_LINE4+LCD_DISP_LENGTH ) {
|
||||
lcd_write((1<<LCD_DDRAM)+LCD_START_LINE1,0);
|
||||
}
|
||||
#endif
|
||||
lcd_waitbusy();
|
||||
#endif
|
||||
lcd_write(c, 1);
|
||||
}
|
||||
|
||||
}/* lcd_putc */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Display string without auto linefeed
|
||||
Input: string to be displayed
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_puts(const char *s)
|
||||
/* print string on lcd (no auto linefeed) */
|
||||
{
|
||||
register char c;
|
||||
|
||||
while ( (c = *s++) ) {
|
||||
lcd_putc(c);
|
||||
}
|
||||
|
||||
}/* lcd_puts */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Display string from program memory without auto linefeed
|
||||
Input: string from program memory be be displayed
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_puts_p(const char *progmem_s)
|
||||
/* print string from program memory on lcd (no auto linefeed) */
|
||||
{
|
||||
register char c;
|
||||
|
||||
while ( (c = pgm_read_byte(progmem_s++)) ) {
|
||||
lcd_putc(c);
|
||||
}
|
||||
|
||||
}/* lcd_puts_p */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
Initialize display and select type of cursor
|
||||
Input: dispAttr LCD_DISP_OFF display off
|
||||
LCD_DISP_ON display on, cursor off
|
||||
LCD_DISP_ON_CURSOR display on, cursor on
|
||||
LCD_DISP_CURSOR_BLINK display on, cursor on flashing
|
||||
Returns: none
|
||||
*************************************************************************/
|
||||
void lcd_init(uint8_t dispAttr)
|
||||
{
|
||||
#if LCD_IO_MODE
|
||||
/*
|
||||
* Initialize LCD to 4 bit I/O mode
|
||||
*/
|
||||
|
||||
if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||
&& ( &LCD_RS_PORT == &LCD_DATA0_PORT) && ( &LCD_RW_PORT == &LCD_DATA0_PORT) && (&LCD_E_PORT == &LCD_DATA0_PORT)
|
||||
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3)
|
||||
&& (LCD_RS_PIN == 4 ) && (LCD_RW_PIN == 5) && (LCD_E_PIN == 6 ) )
|
||||
{
|
||||
/* configure all port bits as output (all LCD lines on same port) */
|
||||
DDR(LCD_DATA0_PORT) |= 0x7F;
|
||||
}
|
||||
else if ( ( &LCD_DATA0_PORT == &LCD_DATA1_PORT) && ( &LCD_DATA1_PORT == &LCD_DATA2_PORT ) && ( &LCD_DATA2_PORT == &LCD_DATA3_PORT )
|
||||
&& (LCD_DATA0_PIN == 0 ) && (LCD_DATA1_PIN == 1) && (LCD_DATA2_PIN == 2) && (LCD_DATA3_PIN == 3) )
|
||||
{
|
||||
/* configure all port bits as output (all LCD data lines on same port, but control lines on different ports) */
|
||||
DDR(LCD_DATA0_PORT) |= 0x0F;
|
||||
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* configure all port bits as output (LCD data and control lines on different ports */
|
||||
DDR(LCD_RS_PORT) |= _BV(LCD_RS_PIN);
|
||||
DDR(LCD_RW_PORT) |= _BV(LCD_RW_PIN);
|
||||
DDR(LCD_E_PORT) |= _BV(LCD_E_PIN);
|
||||
DDR(LCD_DATA0_PORT) |= _BV(LCD_DATA0_PIN);
|
||||
DDR(LCD_DATA1_PORT) |= _BV(LCD_DATA1_PIN);
|
||||
DDR(LCD_DATA2_PORT) |= _BV(LCD_DATA2_PIN);
|
||||
DDR(LCD_DATA3_PORT) |= _BV(LCD_DATA3_PIN);
|
||||
}
|
||||
delay(LCD_DELAY_BOOTUP); /* wait 16ms or more after power-on */
|
||||
|
||||
/* initial write to lcd is 8bit */
|
||||
LCD_DATA1_PORT |= _BV(LCD_DATA1_PIN); // LCD_FUNCTION>>4;
|
||||
LCD_DATA0_PORT |= _BV(LCD_DATA0_PIN); // LCD_FUNCTION_8BIT>>4;
|
||||
lcd_e_toggle();
|
||||
delay(LCD_DELAY_INIT); /* delay, busy flag can't be checked here */
|
||||
|
||||
/* repeat last command */
|
||||
lcd_e_toggle();
|
||||
delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */
|
||||
|
||||
/* repeat last command a third time */
|
||||
lcd_e_toggle();
|
||||
delay(LCD_DELAY_INIT_REP); /* delay, busy flag can't be checked here */
|
||||
|
||||
/* now configure for 4bit mode */
|
||||
LCD_DATA0_PORT &= ~_BV(LCD_DATA0_PIN); // LCD_FUNCTION_4BIT_1LINE>>4
|
||||
lcd_e_toggle();
|
||||
delay(LCD_DELAY_INIT_4BIT); /* some displays need this additional delay */
|
||||
|
||||
/* from now the LCD only accepts 4 bit I/O, we can use lcd_command() */
|
||||
#else
|
||||
/*
|
||||
* Initialize LCD to 8 bit memory mapped mode
|
||||
*/
|
||||
|
||||
/* enable external SRAM (memory mapped lcd) and one wait state */
|
||||
MCUCR = _BV(SRE) | _BV(SRW);
|
||||
|
||||
/* reset LCD */
|
||||
delay(LCD_DELAY_BOOTUP); /* wait 16ms after power-on */
|
||||
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||
delay(LCD_DELAY_INIT); /* wait 5ms */
|
||||
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||
delay(LCD_DELAY_INIT_REP); /* wait 64us */
|
||||
lcd_write(LCD_FUNCTION_8BIT_1LINE,0); /* function set: 8bit interface */
|
||||
delay(LCD_DELAY_INIT_REP); /* wait 64us */
|
||||
#endif
|
||||
|
||||
#if KS0073_4LINES_MODE
|
||||
/* Display with KS0073 controller requires special commands for enabling 4 line mode */
|
||||
lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_ON);
|
||||
lcd_command(KS0073_4LINES_MODE);
|
||||
lcd_command(KS0073_EXTENDED_FUNCTION_REGISTER_OFF);
|
||||
#else
|
||||
lcd_command(LCD_FUNCTION_DEFAULT); /* function set: display lines */
|
||||
#endif
|
||||
lcd_command(LCD_DISP_OFF); /* display off */
|
||||
lcd_clrscr(); /* display clear */
|
||||
lcd_command(LCD_MODE_DEFAULT); /* set entry mode */
|
||||
lcd_command(dispAttr); /* display/cursor control */
|
||||
|
||||
}/* lcd_init */
|
||||
|
371
drivers/avr/hd44780.h
Normal file
371
drivers/avr/hd44780.h
Normal file
@@ -0,0 +1,371 @@
|
||||
#ifndef LCD_H
|
||||
#define LCD_H
|
||||
/*************************************************************************
|
||||
Title : C include file for the HD44780U LCD library (lcd.c)
|
||||
Author: Peter Fleury <pfleury@gmx.ch> http://tinyurl.com/peterfleury
|
||||
License: GNU General Public License Version 3
|
||||
File: $Id: lcd.h,v 1.14.2.4 2015/01/20 17:16:07 peter Exp $
|
||||
Software: AVR-GCC 4.x
|
||||
Hardware: any AVR device, memory mapped mode only for AVR with
|
||||
memory mapped interface (AT90S8515/ATmega8515/ATmega128)
|
||||
***************************************************************************/
|
||||
|
||||
/**
|
||||
@mainpage
|
||||
Collection of libraries for AVR-GCC
|
||||
@author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury
|
||||
@copyright (C) 2015 Peter Fleury, GNU General Public License Version 3
|
||||
|
||||
@file
|
||||
@defgroup pfleury_lcd LCD library <lcd.h>
|
||||
@code #include <lcd.h> @endcode
|
||||
|
||||
@brief Basic routines for interfacing a HD44780U-based character LCD display
|
||||
|
||||
LCD character displays can be found in many devices, like espresso machines, laser printers.
|
||||
The Hitachi HD44780 controller and its compatible controllers like Samsung KS0066U have become an industry standard for these types of displays.
|
||||
|
||||
This library allows easy interfacing with a HD44780 compatible display and can be
|
||||
operated in memory mapped mode (LCD_IO_MODE defined as 0 in the include file lcd.h.) or in
|
||||
4-bit IO port mode (LCD_IO_MODE defined as 1). 8-bit IO port mode is not supported.
|
||||
|
||||
Memory mapped mode is compatible with old Kanda STK200 starter kit, but also supports
|
||||
generation of R/W signal through A8 address line.
|
||||
|
||||
@see The chapter <a href=" http://homepage.hispeed.ch/peterfleury/avr-lcd44780.html" target="_blank">Interfacing a HD44780 Based LCD to an AVR</a>
|
||||
on my home page, which shows example circuits how to connect an LCD to an AVR controller.
|
||||
|
||||
@author Peter Fleury pfleury@gmx.ch http://tinyurl.com/peterfleury
|
||||
|
||||
@version 2.0
|
||||
|
||||
@copyright (C) 2015 Peter Fleury, GNU General Public License Version 3
|
||||
|
||||
*/
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <avr/pgmspace.h>
|
||||
|
||||
#if (__GNUC__ * 100 + __GNUC_MINOR__) < 405
|
||||
#error "This library requires AVR-GCC 4.5 or later, update to newer AVR-GCC compiler !"
|
||||
#endif
|
||||
|
||||
|
||||
/**@{*/
|
||||
|
||||
/*
|
||||
* LCD and target specific definitions below can be defined in a separate include file with name lcd_definitions.h instead modifying this file
|
||||
* by adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile
|
||||
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||
*/
|
||||
#ifdef _LCD_DEFINITIONS_FILE
|
||||
#include "lcd_definitions.h"
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @name Definition for LCD controller type
|
||||
* Use 0 for HD44780 controller, change to 1 for displays with KS0073 controller.
|
||||
*/
|
||||
#ifndef LCD_CONTROLLER_KS0073
|
||||
#define LCD_CONTROLLER_KS0073 0 /**< Use 0 for HD44780 controller, 1 for KS0073 controller */
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @name Definitions for Display Size
|
||||
* Change these definitions to adapt setting to your display
|
||||
*
|
||||
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||
* adding -D_LCD_DEFINITIONS_FILE to the CDEFS section in the Makefile.
|
||||
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||
*
|
||||
*/
|
||||
#ifndef LCD_LINES
|
||||
#define LCD_LINES 2 /**< number of visible lines of the display */
|
||||
#endif
|
||||
#ifndef LCD_DISP_LENGTH
|
||||
#define LCD_DISP_LENGTH 16 /**< visibles characters per line of the display */
|
||||
#endif
|
||||
#ifndef LCD_LINE_LENGTH
|
||||
#define LCD_LINE_LENGTH 0x40 /**< internal line length of the display */
|
||||
#endif
|
||||
#ifndef LCD_START_LINE1
|
||||
#define LCD_START_LINE1 0x00 /**< DDRAM address of first char of line 1 */
|
||||
#endif
|
||||
#ifndef LCD_START_LINE2
|
||||
#define LCD_START_LINE2 0x40 /**< DDRAM address of first char of line 2 */
|
||||
#endif
|
||||
#ifndef LCD_START_LINE3
|
||||
#define LCD_START_LINE3 0x14 /**< DDRAM address of first char of line 3 */
|
||||
#endif
|
||||
#ifndef LCD_START_LINE4
|
||||
#define LCD_START_LINE4 0x54 /**< DDRAM address of first char of line 4 */
|
||||
#endif
|
||||
#ifndef LCD_WRAP_LINES
|
||||
#define LCD_WRAP_LINES 0 /**< 0: no wrap, 1: wrap at end of visibile line */
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @name Definitions for 4-bit IO mode
|
||||
*
|
||||
* The four LCD data lines and the three control lines RS, RW, E can be on the
|
||||
* same port or on different ports.
|
||||
* Change LCD_RS_PORT, LCD_RW_PORT, LCD_E_PORT if you want the control lines on
|
||||
* different ports.
|
||||
*
|
||||
* Normally the four data lines should be mapped to bit 0..3 on one port, but it
|
||||
* is possible to connect these data lines in different order or even on different
|
||||
* ports by adapting the LCD_DATAx_PORT and LCD_DATAx_PIN definitions.
|
||||
*
|
||||
* Adjust these definitions to your target.\n
|
||||
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||
* adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile.
|
||||
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||
*
|
||||
*/
|
||||
#define LCD_IO_MODE 1 /**< 0: memory mapped mode, 1: IO port mode */
|
||||
|
||||
#if LCD_IO_MODE
|
||||
|
||||
#ifndef LCD_PORT
|
||||
#define LCD_PORT PORTA /**< port for the LCD lines */
|
||||
#endif
|
||||
#ifndef LCD_DATA0_PORT
|
||||
#define LCD_DATA0_PORT LCD_PORT /**< port for 4bit data bit 0 */
|
||||
#endif
|
||||
#ifndef LCD_DATA1_PORT
|
||||
#define LCD_DATA1_PORT LCD_PORT /**< port for 4bit data bit 1 */
|
||||
#endif
|
||||
#ifndef LCD_DATA2_PORT
|
||||
#define LCD_DATA2_PORT LCD_PORT /**< port for 4bit data bit 2 */
|
||||
#endif
|
||||
#ifndef LCD_DATA3_PORT
|
||||
#define LCD_DATA3_PORT LCD_PORT /**< port for 4bit data bit 3 */
|
||||
#endif
|
||||
#ifndef LCD_DATA0_PIN
|
||||
#define LCD_DATA0_PIN 4 /**< pin for 4bit data bit 0 */
|
||||
#endif
|
||||
#ifndef LCD_DATA1_PIN
|
||||
#define LCD_DATA1_PIN 5 /**< pin for 4bit data bit 1 */
|
||||
#endif
|
||||
#ifndef LCD_DATA2_PIN
|
||||
#define LCD_DATA2_PIN 6 /**< pin for 4bit data bit 2 */
|
||||
#endif
|
||||
#ifndef LCD_DATA3_PIN
|
||||
#define LCD_DATA3_PIN 7 /**< pin for 4bit data bit 3 */
|
||||
#endif
|
||||
#ifndef LCD_RS_PORT
|
||||
#define LCD_RS_PORT LCD_PORT /**< port for RS line */
|
||||
#endif
|
||||
#ifndef LCD_RS_PIN
|
||||
#define LCD_RS_PIN 3 /**< pin for RS line */
|
||||
#endif
|
||||
#ifndef LCD_RW_PORT
|
||||
#define LCD_RW_PORT LCD_PORT /**< port for RW line */
|
||||
#endif
|
||||
#ifndef LCD_RW_PIN
|
||||
#define LCD_RW_PIN 2 /**< pin for RW line */
|
||||
#endif
|
||||
#ifndef LCD_E_PORT
|
||||
#define LCD_E_PORT LCD_PORT /**< port for Enable line */
|
||||
#endif
|
||||
#ifndef LCD_E_PIN
|
||||
#define LCD_E_PIN 1 /**< pin for Enable line */
|
||||
#endif
|
||||
|
||||
#elif defined(__AVR_AT90S4414__) || defined(__AVR_AT90S8515__) || defined(__AVR_ATmega64__) || \
|
||||
defined(__AVR_ATmega8515__)|| defined(__AVR_ATmega103__) || defined(__AVR_ATmega128__) || \
|
||||
defined(__AVR_ATmega161__) || defined(__AVR_ATmega162__)
|
||||
/*
|
||||
* memory mapped mode is only supported when the device has an external data memory interface
|
||||
*/
|
||||
#define LCD_IO_DATA 0xC000 /* A15=E=1, A14=RS=1 */
|
||||
#define LCD_IO_FUNCTION 0x8000 /* A15=E=1, A14=RS=0 */
|
||||
#define LCD_IO_READ 0x0100 /* A8 =R/W=1 (R/W: 1=Read, 0=Write */
|
||||
|
||||
#else
|
||||
#error "external data memory interface not available for this device, use 4-bit IO port mode"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @name Definitions of delays
|
||||
* Used to calculate delay timers.
|
||||
* Adapt the F_CPU define in the Makefile to the clock frequency in Hz of your target
|
||||
*
|
||||
* These delay times can be adjusted, if some displays require different delays.\n
|
||||
* These definitions can be defined in a separate include file \b lcd_definitions.h instead modifying this file by
|
||||
* adding \b -D_LCD_DEFINITIONS_FILE to the \b CDEFS section in the Makefile.
|
||||
* All definitions added to the file lcd_definitions.h will override the default definitions from lcd.h
|
||||
*/
|
||||
#ifndef LCD_DELAY_BOOTUP
|
||||
#define LCD_DELAY_BOOTUP 16000 /**< delay in micro seconds after power-on */
|
||||
#endif
|
||||
#ifndef LCD_DELAY_INIT
|
||||
#define LCD_DELAY_INIT 5000 /**< delay in micro seconds after initialization command sent */
|
||||
#endif
|
||||
#ifndef LCD_DELAY_INIT_REP
|
||||
#define LCD_DELAY_INIT_REP 64 /**< delay in micro seconds after initialization command repeated */
|
||||
#endif
|
||||
#ifndef LCD_DELAY_INIT_4BIT
|
||||
#define LCD_DELAY_INIT_4BIT 64 /**< delay in micro seconds after setting 4-bit mode */
|
||||
#endif
|
||||
#ifndef LCD_DELAY_BUSY_FLAG
|
||||
#define LCD_DELAY_BUSY_FLAG 4 /**< time in micro seconds the address counter is updated after busy flag is cleared */
|
||||
#endif
|
||||
#ifndef LCD_DELAY_ENABLE_PULSE
|
||||
#define LCD_DELAY_ENABLE_PULSE 1 /**< enable signal pulse width in micro seconds */
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @name Definitions for LCD command instructions
|
||||
* The constants define the various LCD controller instructions which can be passed to the
|
||||
* function lcd_command(), see HD44780 data sheet for a complete description.
|
||||
*/
|
||||
|
||||
/* instruction register bit positions, see HD44780U data sheet */
|
||||
#define LCD_CLR 0 /* DB0: clear display */
|
||||
#define LCD_HOME 1 /* DB1: return to home position */
|
||||
#define LCD_ENTRY_MODE 2 /* DB2: set entry mode */
|
||||
#define LCD_ENTRY_INC 1 /* DB1: 1=increment, 0=decrement */
|
||||
#define LCD_ENTRY_SHIFT 0 /* DB2: 1=display shift on */
|
||||
#define LCD_ON 3 /* DB3: turn lcd/cursor on */
|
||||
#define LCD_ON_DISPLAY 2 /* DB2: turn display on */
|
||||
#define LCD_ON_CURSOR 1 /* DB1: turn cursor on */
|
||||
#define LCD_ON_BLINK 0 /* DB0: blinking cursor ? */
|
||||
#define LCD_MOVE 4 /* DB4: move cursor/display */
|
||||
#define LCD_MOVE_DISP 3 /* DB3: move display (0-> cursor) ? */
|
||||
#define LCD_MOVE_RIGHT 2 /* DB2: move right (0-> left) ? */
|
||||
#define LCD_FUNCTION 5 /* DB5: function set */
|
||||
#define LCD_FUNCTION_8BIT 4 /* DB4: set 8BIT mode (0->4BIT mode) */
|
||||
#define LCD_FUNCTION_2LINES 3 /* DB3: two lines (0->one line) */
|
||||
#define LCD_FUNCTION_10DOTS 2 /* DB2: 5x10 font (0->5x7 font) */
|
||||
#define LCD_CGRAM 6 /* DB6: set CG RAM address */
|
||||
#define LCD_DDRAM 7 /* DB7: set DD RAM address */
|
||||
#define LCD_BUSY 7 /* DB7: LCD is busy */
|
||||
|
||||
/* set entry mode: display shift on/off, dec/inc cursor move direction */
|
||||
#define LCD_ENTRY_DEC 0x04 /* display shift off, dec cursor move dir */
|
||||
#define LCD_ENTRY_DEC_SHIFT 0x05 /* display shift on, dec cursor move dir */
|
||||
#define LCD_ENTRY_INC_ 0x06 /* display shift off, inc cursor move dir */
|
||||
#define LCD_ENTRY_INC_SHIFT 0x07 /* display shift on, inc cursor move dir */
|
||||
|
||||
/* display on/off, cursor on/off, blinking char at cursor position */
|
||||
#define LCD_DISP_OFF 0x08 /* display off */
|
||||
#define LCD_DISP_ON 0x0C /* display on, cursor off */
|
||||
#define LCD_DISP_ON_BLINK 0x0D /* display on, cursor off, blink char */
|
||||
#define LCD_DISP_ON_CURSOR 0x0E /* display on, cursor on */
|
||||
#define LCD_DISP_ON_CURSOR_BLINK 0x0F /* display on, cursor on, blink char */
|
||||
|
||||
/* move cursor/shift display */
|
||||
#define LCD_MOVE_CURSOR_LEFT 0x10 /* move cursor left (decrement) */
|
||||
#define LCD_MOVE_CURSOR_RIGHT 0x14 /* move cursor right (increment) */
|
||||
#define LCD_MOVE_DISP_LEFT 0x18 /* shift display left */
|
||||
#define LCD_MOVE_DISP_RIGHT 0x1C /* shift display right */
|
||||
|
||||
/* function set: set interface data length and number of display lines */
|
||||
#define LCD_FUNCTION_4BIT_1LINE 0x20 /* 4-bit interface, single line, 5x7 dots */
|
||||
#define LCD_FUNCTION_4BIT_2LINES 0x28 /* 4-bit interface, dual line, 5x7 dots */
|
||||
#define LCD_FUNCTION_8BIT_1LINE 0x30 /* 8-bit interface, single line, 5x7 dots */
|
||||
#define LCD_FUNCTION_8BIT_2LINES 0x38 /* 8-bit interface, dual line, 5x7 dots */
|
||||
|
||||
|
||||
#define LCD_MODE_DEFAULT ((1<<LCD_ENTRY_MODE) | (1<<LCD_ENTRY_INC) )
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @name Functions
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
@brief Initialize display and select type of cursor
|
||||
@param dispAttr \b LCD_DISP_OFF display off\n
|
||||
\b LCD_DISP_ON display on, cursor off\n
|
||||
\b LCD_DISP_ON_CURSOR display on, cursor on\n
|
||||
\b LCD_DISP_ON_CURSOR_BLINK display on, cursor on flashing
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_init(uint8_t dispAttr);
|
||||
|
||||
|
||||
/**
|
||||
@brief Clear display and set cursor to home position
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_clrscr(void);
|
||||
|
||||
|
||||
/**
|
||||
@brief Set cursor to home position
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_home(void);
|
||||
|
||||
|
||||
/**
|
||||
@brief Set cursor to specified position
|
||||
|
||||
@param x horizontal position\n (0: left most position)
|
||||
@param y vertical position\n (0: first line)
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_gotoxy(uint8_t x, uint8_t y);
|
||||
|
||||
|
||||
/**
|
||||
@brief Display character at current cursor position
|
||||
@param c character to be displayed
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_putc(char c);
|
||||
|
||||
|
||||
/**
|
||||
@brief Display string without auto linefeed
|
||||
@param s string to be displayed
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_puts(const char *s);
|
||||
|
||||
|
||||
/**
|
||||
@brief Display string from program memory without auto linefeed
|
||||
@param progmem_s string from program memory be be displayed
|
||||
@return none
|
||||
@see lcd_puts_P
|
||||
*/
|
||||
extern void lcd_puts_p(const char *progmem_s);
|
||||
|
||||
|
||||
/**
|
||||
@brief Send LCD controller instruction command
|
||||
@param cmd instruction to send to LCD controller, see HD44780 data sheet
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_command(uint8_t cmd);
|
||||
|
||||
|
||||
/**
|
||||
@brief Send data byte to LCD controller
|
||||
|
||||
Similar to lcd_putc(), but without interpreting LF
|
||||
@param data byte to send to LCD controller, see HD44780 data sheet
|
||||
@return none
|
||||
*/
|
||||
extern void lcd_data(uint8_t data);
|
||||
|
||||
|
||||
/**
|
||||
@brief macros for automatically storing string constant in program memory
|
||||
*/
|
||||
#define lcd_puts_P(__s) lcd_puts_p(PSTR(__s))
|
||||
|
||||
/**@}*/
|
||||
|
||||
#endif //LCD_H
|
||||
|
100
drivers/avr/i2c_slave.c
Executable file
100
drivers/avr/i2c_slave.c
Executable file
@@ -0,0 +1,100 @@
|
||||
/* Library made by: g4lvanix
|
||||
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||
*/
|
||||
|
||||
#include <avr/io.h>
|
||||
#include <util/twi.h>
|
||||
#include <avr/interrupt.h>
|
||||
|
||||
#include "i2c_slave.h"
|
||||
|
||||
void i2c_init(uint8_t address){
|
||||
// load address into TWI address register
|
||||
TWAR = (address << 1);
|
||||
// set the TWCR to enable address matching and enable TWI, clear TWINT, enable TWI interrupt
|
||||
TWCR = (1<<TWIE) | (1<<TWEA) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
void i2c_stop(void){
|
||||
// clear acknowledge and enable bits
|
||||
TWCR &= ~( (1<<TWEA) | (1<<TWEN) );
|
||||
}
|
||||
|
||||
ISR(TWI_vect){
|
||||
|
||||
// temporary stores the received data
|
||||
uint8_t data;
|
||||
|
||||
// own address has been acknowledged
|
||||
if( (TWSR & 0xF8) == TW_SR_SLA_ACK ){
|
||||
buffer_address = 0xFF;
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_SR_DATA_ACK ){ // data has been received in slave receiver mode
|
||||
|
||||
// save the received byte inside data
|
||||
data = TWDR;
|
||||
|
||||
// check wether an address has already been transmitted or not
|
||||
if(buffer_address == 0xFF){
|
||||
|
||||
buffer_address = data;
|
||||
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{ // if a databyte has already been received
|
||||
|
||||
// store the data at the current address
|
||||
rxbuffer[buffer_address] = data;
|
||||
|
||||
// increment the buffer address
|
||||
buffer_address++;
|
||||
|
||||
// if there is still enough space inside the buffer
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to receive next byte and acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( (TWSR & 0xF8) == TW_ST_DATA_ACK ){ // device has been addressed to be a transmitter
|
||||
|
||||
// copy data from TWDR to the temporary memory
|
||||
data = TWDR;
|
||||
|
||||
// if no buffer read address has been sent yet
|
||||
if( buffer_address == 0xFF ){
|
||||
buffer_address = data;
|
||||
}
|
||||
|
||||
// copy the specified buffer address into the TWDR register for transmission
|
||||
TWDR = txbuffer[buffer_address];
|
||||
// increment buffer read address
|
||||
buffer_address++;
|
||||
|
||||
// if there is another buffer address that can be sent
|
||||
if(buffer_address < 0xFF){
|
||||
// clear TWI interrupt flag, prepare to send next byte and receive acknowledge
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
else{
|
||||
// Don't acknowledge
|
||||
TWCR &= ~(1<<TWEA);
|
||||
// clear TWI interrupt flag, prepare to receive last byte.
|
||||
TWCR |= (1<<TWIE) | (1<<TWINT) | (1<<TWEN);
|
||||
}
|
||||
|
||||
}
|
||||
else{
|
||||
// if none of the above apply prepare TWI to be addressed again
|
||||
TWCR |= (1<<TWIE) | (1<<TWEA) | (1<<TWEN);
|
||||
}
|
||||
}
|
19
drivers/avr/i2c_slave.h
Executable file
19
drivers/avr/i2c_slave.h
Executable file
@@ -0,0 +1,19 @@
|
||||
/* Library made by: g4lvanix
|
||||
* Github repository: https://github.com/g4lvanix/I2C-slave-lib
|
||||
|
||||
Info: Inititate the library by giving the required address.
|
||||
Read or write to the necessary buffer according to the opperation.
|
||||
*/
|
||||
|
||||
#ifndef I2C_SLAVE_H
|
||||
#define I2C_SLAVE_H
|
||||
|
||||
volatile uint8_t buffer_address;
|
||||
volatile uint8_t txbuffer[0xFF];
|
||||
volatile uint8_t rxbuffer[0xFF];
|
||||
|
||||
void i2c_init(uint8_t address);
|
||||
void i2c_stop(void);
|
||||
ISR(TWI_vect);
|
||||
|
||||
#endif // I2C_SLAVE_H
|
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
43
keyboards/bfo9000/keymaps/andylikescandy6x18/config.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
This is the c configuration file for the keymap
|
||||
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
Copyright 2015 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 CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* Use I2C or Serial, not both */
|
||||
|
||||
#define USE_SERIAL
|
||||
// #define USE_I2C
|
||||
|
||||
/* Select hand configuration */
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
||||
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
#endif
|
64
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
64
keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "action_layer.h"
|
||||
|
||||
|
||||
|
||||
#define _BASE 0
|
||||
#define _RAISE 1
|
||||
#define _NAVIGATION 3
|
||||
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
// layer access
|
||||
#define RSESPC LT( 1, KC_SPC)
|
||||
#define NAVSPC LT( 3, KC_SPC)
|
||||
|
||||
// Key Combos
|
||||
#define CTRLSFT LCTL(KC_LSFT)
|
||||
#define CTLALTSFT LALT(LCTL(KC_LSFT))
|
||||
#define CTLALTDEL LALT(LCTL(KC_DEL))
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
[_BASE] = LAYOUT( \
|
||||
KC_KP_SLASH, KC_KP_ASTERISK, KC_PMNS, KC_PPLS, KC_PSCREEN, KC_CAPS, 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_P7, KC_P8, KC_P9, KC_LBRC, KC_RBRC, KC_GRV, 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_P4, KC_P5, KC_P6, KC_HOME, KC_END, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_BSLS, \
|
||||
KC_P1, KC_P2, KC_P3, KC_SLCK, KC_PGUP, KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, \
|
||||
KC_P0, KC_PDOT, KC_PENT, KC_UP, KC_PGDN, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), KC_PGUP, \
|
||||
CTLALTDEL, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_LCTL, CTRLSFT, KC_LGUI, KC_LALT, RSESPC, NAVSPC, NAVSPC, RSESPC, KC_RGUI, KC_RALT, KC_APPLICATION, KC_RCTL, KC_PGDN \
|
||||
),
|
||||
[_RAISE] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
),
|
||||
[_NAVIGATION] = LAYOUT( \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUSE, KC_NUMLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_DEL, _______, XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, XXXXXXX \
|
||||
)
|
||||
// ),
|
||||
/// [_NAVIGATION] = {
|
||||
// {XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
|
||||
// {KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
|
||||
// {LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
|
||||
// {LCTL(LALT(KC_LSFT)),LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT)}
|
||||
// }
|
||||
|
||||
};
|
@@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_RSFT, MO(1),
|
||||
KC_CAPS, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RGUI, KC_RCTL),
|
||||
KC_CAPS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_SPC, KC_SPC, KC_RGUI, KC_RALT, KC_RALT, KC_RCTL),
|
||||
|
||||
|
||||
|
||||
|
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
31
keyboards/e6v2/le/keymaps/eric/keymap.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*rBase layer */
|
||||
[0] = LAYOUT(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, MO(1),
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, KC_SPACE, KC_SPACE, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, KC_RCTL
|
||||
),
|
||||
|
||||
/* Function layer */
|
||||
[1] = LAYOUT(
|
||||
KC_CAPS, 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_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_HOME, KC_AMPR, KC_TILD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_UP, KC_DEL, KC_BSPC,
|
||||
KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_ASTR, KC_TRNS, KC_TRNS, KC_PGUP, KC_HOME, KC_LEFT, KC_RGHT, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_LPRN, KC_RPRN, KC_PIPE, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(2), MO(2), KC_TRNS
|
||||
),
|
||||
|
||||
/* Reset layer */
|
||||
[2] = LAYOUT(
|
||||
RESET, KC_A, 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, 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, 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
|
||||
),
|
||||
|
||||
};
|
14
keyboards/handwired/atreus50/keymaps/ajp10304/config.h
Normal file
14
keyboards/handwired/atreus50/keymaps/ajp10304/config.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#undef MATRIX_ROW_PINS
|
||||
#undef MATRIX_COL_PINS
|
||||
|
||||
#define MATRIX_ROW_PINS { D4, D5, C7, C6 }
|
||||
#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, D7, D1, B7, D0, B3, B2, B1, B0 }
|
||||
|
||||
#endif
|
348
keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c
Normal file
348
keyboards/handwired/atreus50/keymaps/ajp10304/keymap.c
Normal file
@@ -0,0 +1,348 @@
|
||||
#include "atreus50.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
#include "keymap_uk.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_MAC,
|
||||
_LOWER,
|
||||
_MLWR,
|
||||
_RAISE,
|
||||
_MRSE,
|
||||
_FUNC,
|
||||
_MFNC,
|
||||
_FUNC2,
|
||||
_MFNC2,
|
||||
_ADJUST,
|
||||
_MOUSE
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
MAC,
|
||||
FUNC,
|
||||
MFNC,
|
||||
FUNC2,
|
||||
MFNC2,
|
||||
LOWER,
|
||||
MLWR,
|
||||
RAISE,
|
||||
MRSE,
|
||||
MOUSE,
|
||||
DYNAMIC_MACRO_RANGE
|
||||
};
|
||||
|
||||
#include "dynamic_macro.h"
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------| |-----------------------------------------.
|
||||
* | Esc | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | | H | J | K | L | ;: | Enter|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shft | Z | X | C | V | B | | N | M | ,< | .> | /? | Shft |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = KEYMAP(
|
||||
KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC ,
|
||||
MT(MOD_LSFT, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, KC_ENT) ,
|
||||
KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSHIFT ,
|
||||
MO(_FUNC), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_LCTL, KC_LALT, KC_SPC, RAISE, KC_LSHIFT, KC_BTN2, KC_RCTL, MO(_FUNC2)
|
||||
),
|
||||
|
||||
/* Function
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| \| | `¬ | #~ | * | -_ | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = KEYMAP(
|
||||
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, UK_TILD, KC_INSERT ,
|
||||
KC_LSHIFT, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_PAST, KC_MINS, KC_EQL, KC_BSLASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_MOUSE), _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | 1! | 2" | 3£ | 4$ | 5% | 6^ | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ! | " | £ | $ | % | ^ | | & | * | ( | ) |WrdDel|WrdBks|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | Shift| \| | `¬ | #~ | '@ | -_ | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = KEYMAP(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_BSPC ,
|
||||
LSFT(KC_1), LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_9), LSFT(KC_0), LCTL(KC_DEL), LCTL(KC_BSPC) ,
|
||||
KC_LSPO, KC_NONUS_BSLASH, KC_GRAVE, KC_NONUS_HASH, KC_QUOT, KC_MINS, KC_EQL, KC_NONUS_HASH, KC_LBRC, KC_RBRC, KC_QUOT, MT(MOD_RSFT, KC_ENT) ,
|
||||
_______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ` | |WRDSEL| [ | ] | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ` | | | ( | ) | | | | HOME | UP | END | |ZOOM +|
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | | | { | } | | | |< | LEFT | DOWN |RIGHT | >| |ZOOM -|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | Mouse| | | | | Alt | Ctrl | Alt |Enter |Raise | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = KEYMAP(
|
||||
KC_GRV, XXXXXXX, M(1), KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, KC_PGUP, KC_HOME, KC_PGDOWN, XXXXXXX, KC_PSCREEN ,
|
||||
KC_GRV, XXXXXXX, XXXXXXX, LSFT(KC_9), LSFT(KC_0), XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, LCTL(LSFT(KC_EQL)) ,
|
||||
_______, XXXXXXX, XXXXXXX, LSFT(KC_LBRC), LSFT(KC_RBRC), XXXXXXX, LCTL(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_RIGHT), LCTL(KC_MINS) ,
|
||||
MO(_MOUSE), _______, _______, _______, _______, KC_LALT, _______, _______, KC_ENT, _______, XXXXXXX, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ???? | Reset|Qwerty| | | REC1 | | REC2 | | | | | Del |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | CAPS | | | | | PLAY1| | PLAY2| Mute | Vol+ | Play | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | PC/MC| | | | | STOP | | STOP | Prev | Vol- | Next | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = KEYMAP(
|
||||
M(0), RESET, QWERTY, _______, _______, DYN_REC_START1, DYN_REC_START2, _______, _______, _______, _______, KC_DEL ,
|
||||
KC_CAPS, _______, _______, _______, _______, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, KC_AUDIO_MUTE, KC_AUDIO_VOL_UP, KC_MEDIA_PLAY_PAUSE, _______, _______ ,
|
||||
TG(_MAC), _______, _______, _______, _______, DYN_REC_STOP, DYN_REC_STOP, KC_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_MEDIA_NEXT_TRACK, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Mouse
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | ESC | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | ACC0 | ACC1 | ACC2 | | | | | | BTN1 | UP | BTN2 | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | ACC0 | ACC1 | ACC2 | | | | | | LEFT | DOWN |RIGHT | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOUSE] = KEYMAP(
|
||||
KC_ESC , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, _______, _______ ,
|
||||
KC_MS_ACCEL0, KC_MS_ACCEL1, KC_MS_ACCEL2, _______, _______, _______, _______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Function 2 (Right hand side)
|
||||
* ,------------------------------------------ |-----------------------------------------.
|
||||
* | | |WRDSEL| | | | | LNDEL| | | | | |
|
||||
* |------+------+------+------+------+------- |------+------+------+------+------+------|
|
||||
* | | | LNSEL| DUP | | | | | |LNJOIN| | | |
|
||||
* |------+------+------+------+------+------| |------+------+------+------+------+------|
|
||||
* | | UNDO | CUT | COPY | PASTE| | | | | | | | MODE |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC2] = KEYMAP(
|
||||
_______, _______, M(1), _______, _______, _______, M(5), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(3), M(7), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, M(98) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MAC] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
MFNC, _______, _______, _______, MLWR, _______, _______, _______, _______, MRSE, _______, _______, _______, MFNC2
|
||||
),
|
||||
|
||||
[_MLWR] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MRSE] = KEYMAP(
|
||||
_______, _______, M(2), _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, LCTL(KC_A), _______, LCTL(KC_E), _______, LGUI(KC_EQL) ,
|
||||
_______, _______, _______, _______, _______, _______, LALT(KC_LEFT), _______, _______, _______, LALT(KC_RIGHT), LGUI(KC_MINS) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC] = KEYMAP(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LGUI(KC_PENT) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MFNC2] = KEYMAP(
|
||||
_______, _______, M(2), _______, _______, _______, M(6), _______, _______, _______, _______, _______,
|
||||
_______, _______, M(4), M(8), _______, _______, _______, M(10), _______, _______, _______, _______,
|
||||
_______, LGUI(KC_Z), LGUI(KC_X), LGUI(KC_C), LGUI(KC_V), _______, _______, _______, _______, _______, _______, M(99) ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
void persistant_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
|
||||
if (!process_record_dynamic_macro(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case MLWR:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
layer_on(_MLWR);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
layer_off(_MLWR);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case MRSE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
layer_on(_MRSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_MRSE);
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
case MFNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
layer_on(_MFNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
layer_off(_MFNC);
|
||||
}
|
||||
return false;
|
||||
case MFNC2:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC2);
|
||||
layer_on(_MFNC2);
|
||||
} else {
|
||||
layer_off(_FUNC2);
|
||||
layer_off(_MFNC2);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t keycode, uint8_t opt) {
|
||||
// These would trigger when you hit a key mapped as M(0)
|
||||
if (record->event.pressed) {
|
||||
switch(keycode) {
|
||||
case 0: // Some custom string here
|
||||
SEND_STRING("");
|
||||
return false;
|
||||
|
||||
case 1: // Word Select
|
||||
SEND_STRING(SS_DOWN(X_LCTRL) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LCTRL));
|
||||
return false;
|
||||
|
||||
case 2: // Word Select Mac
|
||||
SEND_STRING(SS_DOWN(X_LALT) SS_TAP(X_RIGHT) SS_DOWN(X_LSHIFT) SS_TAP(X_LEFT) SS_UP(X_LSHIFT) SS_UP(X_LALT));
|
||||
return false;
|
||||
|
||||
case 3: // Line Select
|
||||
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||
return false;
|
||||
|
||||
case 4: // Line Select Mac
|
||||
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||
return false;
|
||||
|
||||
case 5: // Line Delete
|
||||
SEND_STRING(SS_TAP(X_HOME) SS_DOWN(X_LSHIFT) SS_TAP(X_END) SS_UP(X_LSHIFT));
|
||||
SEND_STRING(SS_TAP(X_BSPACE));
|
||||
return false;
|
||||
|
||||
case 6: // Line Delete Mac
|
||||
SEND_STRING(SS_LCTRL("a") SS_DOWN(X_LSHIFT) SS_LCTRL("e") SS_UP(X_LSHIFT));
|
||||
SEND_STRING(SS_TAP(X_BSPACE));
|
||||
return false;
|
||||
|
||||
case 7: // Duplicate Selection
|
||||
SEND_STRING(SS_LCTRL("c") SS_TAP(X_RIGHT) SS_LCTRL("v"));
|
||||
return false;
|
||||
|
||||
case 8: // Duplicate Selection Mac
|
||||
SEND_STRING(SS_LGUI("c") SS_TAP(X_RIGHT) SS_LGUI("v"));
|
||||
return false;
|
||||
|
||||
case 9: // Join line
|
||||
SEND_STRING(SS_TAP(X_END) SS_TAP(X_DELETE));
|
||||
return false;
|
||||
|
||||
case 10: // Join line Mac
|
||||
SEND_STRING(SS_LCTRL("e") SS_TAP(X_DELETE));
|
||||
return false;
|
||||
|
||||
case 98: // Print mode
|
||||
SEND_STRING("PC");
|
||||
return false;
|
||||
|
||||
case 99: // Print mode
|
||||
SEND_STRING("OSX");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
108
keyboards/handwired/atreus50/keymaps/ajp10304/readme.md
Normal file
108
keyboards/handwired/atreus50/keymaps/ajp10304/readme.md
Normal file
@@ -0,0 +1,108 @@
|
||||
# AJP10304 Custom Atreus50 Layout
|
||||
# Also available for the Planck and JJ40
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
||||
**Note:** The below tables assume a UK layout.
|
||||
|
||||
##### Main Qwerty Layer
|
||||
|
||||
* Tab: when held, operates as shift.
|
||||
* Enter: when held, operates as shift.
|
||||
* MENU: perform right-click
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| ---- |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| ----:|
|
||||
| Esc | Q | W | E | R | T | | | Y | U | I | O | P | Bksp |
|
||||
| Tab | A | S | D | F | G | | | H | J | K | L | ;: | Enter|
|
||||
| Shft | Z | X | C | V | B | | | N | M | ,< | .> | /? | Shft |
|
||||
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Raise | Shift| MENU | Ctrl | Fn2 |
|
||||
|
||||
##### Function Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| F1 | F2 | F3 | F4 | F5 | F6 | | | F7 | F8 | F9 | F10 | F11 | F12 |
|
||||
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | ~ |INSERT|
|
||||
| Shift | \| | `¬ | #~ | * | -_ | | | =+ | \| | [{ | ]} | '@ |Shift |
|
||||
| Fn | Ctrl | Alt | GUI |Lower | Bksp | Ctrl | Alt |Space |Mouse | MENU | Alt | Ctrl | Fn2 |
|
||||
|
||||
##### Lower Layer
|
||||
Activated when `Lower` is held in the above `qwerty` layer.
|
||||
|
||||
* Numbers are along the top row, their shifted counterparts are on row 2.
|
||||
* WrdBks: `backspace` with `ctrl` applied. I.e. delete a word.
|
||||
* WrdDel: `delete` with `ctrl` applied. I.e. forward delete a word.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| 1! | 2" | 3£ | 4$ | 5% | 6^ | | | 7& | 8* | 9( | 0) | DEL | Bksp |
|
||||
| ! | " | £ | $ | % | ^ | | | & | * | ( | ) |WrdDel|WrdBks|
|
||||
| Shift | \| | `¬ | #~ | '@ | -_ | | | =+ | #~ | [{ | ]} | '@ |Shift |
|
||||
| | | | |Lower | Del | Ctrl | Alt |Space | | Next | Vol- | Vol+ | Play |
|
||||
|
||||
##### Raise Layer
|
||||
Activated when `Raise` is held in the above `qwerty` layer.
|
||||
|
||||
* Preferred layer for typing brackets.
|
||||
* Allows for cursor navigation to be used solely with the right hand.
|
||||
* WRDSEL: Select the word where the cursor is.
|
||||
* |< and >|: Apply `ctrl` to `left` and `right` respectively for word jumping.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---: | :---:| :---:| :---:| :---: | :---:|
|
||||
| ` | |WRDSEL| [ | ] | | | | | PGUP | HOME |PGDOWN| |PRNTSC|
|
||||
| ` | | | ( | ) | | | | | HOME | UP | END | |ZOOM +|
|
||||
| | | | { | } | | | ||<| LEFT | DOWN |RIGHT |>||ZOOM -|
|
||||
| Mouse | | | | | Alt | Ctrl | Alt | Enter |Raise | | | | |
|
||||
|
||||
##### Lower + Raise
|
||||
Activated when `Lower` and `Raise` are held together in the above `qwerty` layer.
|
||||
|
||||
* Audio controls in the same position as cursor keys from the `Raise` layer.
|
||||
* ????: Runs a macro for outputting a text string. Do not use this store passwords.
|
||||
* Reset: Enter bootloader for flashing firmware to the keyboard.
|
||||
* CAPS: Toggle caps lock.
|
||||
* Macro functions: Allows recording of macros. To start recording the macro, press either REC1 or REC2.
|
||||
To finish the recording, press STOP. To replay the macro, press either PLAY1 or PLAY2.
|
||||
* MAC: Toggle MAC OS extensions to layers. This allows MLWR to be enabled with LOWER,
|
||||
MRSE with RAISE, MFNC with FUNC and MFNC2 with FUNC2 respectively.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: |:----:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ???? | Reset|Qwerty| | | REC1 | | | REC2 | | | | | Del |
|
||||
| CAPS | | | | | PLAY1| | |PLAY2 | Mute | Vol+ | Play | | |
|
||||
| MAC | | | | | STOP1| | |STOP2 | Prev | Vol- | Next | | |
|
||||
| | | | | | | Ctrl | Alt | | | DYN | | | |
|
||||
|
||||
##### Function 2 Layer
|
||||
Activated when `fn` held in the above `qwerty` layer.
|
||||
* WRDSEL: Select the word where the cursor is.
|
||||
* LNDEL: Delete the line where the cursor is.
|
||||
* LNSEL: Select the line where the cursor is.
|
||||
* DUP: Duplicate the selected text.
|
||||
* LNJOIN: Join the line where the cursor is with the following line.
|
||||
* MODE: Print either `PC` or `OSX` depending on what layer mode is active.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| | |WRDSEL| | | | | | LNDEL| | | | | |
|
||||
| | | LNSEL| DUP | | | | | | |LNJOIN| | | |
|
||||
| | UNDO | CUT | COPY | PASTE| | | | | | | | | MODE |
|
||||
| | | | | | | Ctrl | Alt | | | | | | |
|
||||
|
||||
##### Mouse Layer
|
||||
Activated when `fn` and `raise` held together.
|
||||
|
||||
| | | | | | | | | | | | | | |
|
||||
| :---: | :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:| :---:|
|
||||
| ESC | | | | | | | | | | | | | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | | | BTN1 | UP | BTN2 | | |
|
||||
| ACC0 | ACC1 | ACC2 | | | | | | | LEFT | DOWN | RIGHT| | |
|
||||
| | | | | | | Ctrl | Alt | | | | | | |
|
||||
|
||||
|
||||
##Program Command
|
||||
teensy_loader_cli -w -mmcu=atmega32u4 handwired_atreus50_ajp10304.hex
|
12
keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk
Normal file
12
keyboards/handwired/atreus50/keymaps/ajp10304/rules.mk
Normal file
@@ -0,0 +1,12 @@
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
AUDIO_ENABLE = no
|
||||
MOUSEKEY_ENABLE = yes
|
||||
|
||||
TEMP := $(OPT_DEFS)
|
||||
OPT_DEFS = $(filter-out -DBOOTLOADER_SIZE=4096,$(TEMP))
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=512
|
||||
|
||||
BOOTLOADER = halfkay
|
@@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(HHKB),
|
||||
KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, KC_RGUI),
|
||||
KC_LALT, KC_LGUI, /* */ KC_SPC, KC_RGUI, KC_RALT),
|
||||
|
||||
/* Layer HHKB: HHKB mode (HHKB Fn)
|
||||
|------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# AJP10304 Custom JJ40 Layout
|
||||
###Based on my Planck layout of the same name.
|
||||
# Also available for the Atreus50 and Planck
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
58
keyboards/kmini/config.h
Executable file
58
keyboards/kmini/config.h
Executable file
@@ -0,0 +1,58 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* 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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6050
|
||||
#define DEVICE_VER 0x0104
|
||||
#define MANUFACTURER Revo
|
||||
#define PRODUCT KMAC Kmini
|
||||
#define DESCRIPTION QMK keyboard firmware for Revo KMAC Mini
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 5
|
||||
#define MATRIX_COLS 17
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
* The KMAC uses a demultiplexer for some of the cols.
|
||||
* See matrix.c for more details.
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 }
|
||||
#define MATRIX_COL_PINS { }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION CUSTOM_MATRIX
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
// #define BACKLIGHT_PIN B7
|
||||
// #define BACKLIGHT_BREATHING
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
#endif
|
12
keyboards/kmini/info.json
Executable file
12
keyboards/kmini/info.json
Executable file
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"keyboard_name": "KMAC Mini",
|
||||
"url": "http://kbdmodadmin.cafe24.com/product/detail.html?product_no=12&cate_no=4&display_group=1",
|
||||
"maintainer": "maartenwut",
|
||||
"width": 18.25,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [{"label":"F1", "x":0, "y":0}, {"label":"F2", "x":1, "y":0}, {"label":"Esc", "x":2.25, "y":0}, {"label":"!", "x":3.25, "y":0}, {"label":"@", "x":4.25, "y":0}, {"label":"#", "x":5.25, "y":0}, {"label":"$", "x":6.25, "y":0}, {"label":"%", "x":7.25, "y":0}, {"label":"^", "x":8.25, "y":0}, {"label":"&", "x":9.25, "y":0}, {"label":"*", "x":10.25, "y":0}, {"label":"(", "x":11.25, "y":0}, {"label":")", "x":12.25, "y":0}, {"label":"_", "x":13.25, "y":0}, {"label":"+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"Insert", "x":17.25, "y":0}, {"label":"F3", "x":0, "y":1}, {"label":"F4", "x":1, "y":1}, {"label":"Tab", "x":2.25, "y":1, "w":1.5}, {"label":"Q", "x":3.75, "y":1}, {"label":"W", "x":4.75, "y":1}, {"label":"E", "x":5.75, "y":1}, {"label":"R", "x":6.75, "y":1}, {"label":"T", "x":7.75, "y":1}, {"label":"Y", "x":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"|", "x":15.75, "y":1, "w":1.5}, {"label":"Delete", "x":17.25, "y":1}, {"label":"F5", "x":0, "y":2}, {"label":"F6", "x":1, "y":2}, {"label":"Caps Lock", "x":2.25, "y":2, "w":1.75}, {"label":"A", "x":4, "y":2}, {"label":"S", "x":5, "y":2}, {"label":"D", "x":6, "y":2}, {"label":"F", "x":7, "y":2}, {"label":"G", "x":8, "y":2}, {"label":"H", "x":9, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"PgUp", "x":17.25, "y":2}, {"label":"F7", "x":0, "y":3}, {"label":"F8", "x":1, "y":3}, {"label":"Shift", "x":2.25, "y":3, "w":2.25}, {"label":"Z", "x":4.5, "y":3}, {"label":"X", "x":5.5, "y":3}, {"label":"C", "x":6.5, "y":3}, {"label":"V", "x":7.5, "y":3}, {"label":"B", "x":8.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"\u2191", "x":16.25, "y":3}, {"label":"PgDn", "x":17.25, "y":3}, {"label":"F9", "x":0, "y":4}, {"label":"F10", "x":1, "y":4}, {"label":"Ctrl", "x":2.25, "y":4, "w":1.5}, {"label":"GUI", "x":3.75, "y":4}, {"label":"Alt", "x":4.75, "y":4, "w":1.5}, {"x":6.25, "y":4, "w":7}, {"label":"Fn", "x":13.25, "y":4, "w":1.5}, {"label":"\u2190", "x":15.25, "y":4}, {"label":"\u2193", "x":16.25, "y":4}, {"label":"\u2192", "x":17.25, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
57
keyboards/kmini/keymaps/default/keymap.c
Executable file
57
keyboards/kmini/keymaps/default/keymap.c
Executable file
@@ -0,0 +1,57 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _MA 0
|
||||
#define _FN 1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MA] = LAYOUT(
|
||||
KC_F1, KC_F2, 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_INS, \
|
||||
KC_F3, KC_F4, 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_F5, KC_F6, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \
|
||||
KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, \
|
||||
KC_F9, KC_F10, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(_FN), KC_LEFT, KC_DOWN, KC_RGHT \
|
||||
),
|
||||
[_FN] = LAYOUT(
|
||||
_______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RESET, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
|
||||
),
|
||||
};
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
|
||||
PORTB &= ~(1<<1); // LO
|
||||
} else {
|
||||
PORTB |= (1<<1); // HI
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
53
keyboards/kmini/kmini.c
Executable file
53
keyboards/kmini/kmini.c
Executable file
@@ -0,0 +1,53 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* 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 "kmini.h"
|
||||
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
led_init_ports();
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_init_ports(void) {
|
||||
DDRB |= (1<<1); // OUT
|
||||
DDRB |= (1<<2); // OUT
|
||||
DDRB |= (1<<3); // OUT
|
||||
}
|
||||
|
||||
/* LED pin configuration
|
||||
* Caps Lock: Low B1
|
||||
* Side1: Low B3
|
||||
* Side2: Low B2
|
||||
*/
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
36
keyboards/kmini/kmini.h
Executable file
36
keyboards/kmini/kmini.h
Executable file
@@ -0,0 +1,36 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* 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 KMINI_H
|
||||
#define KMINI_H
|
||||
#define ___ KC_NO
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \
|
||||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \
|
||||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, \
|
||||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3E, K3F, K3G, \
|
||||
K40, K41, K42, K43, K44, K47, K4C, K4E, K4F, K4G \
|
||||
) { \
|
||||
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G}, \
|
||||
{K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G}, \
|
||||
{K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, ___, K2F, K2G}, \
|
||||
{K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, ___, K3E, K3F, K3G}, \
|
||||
{K40, K41, K42, K43, K44, ___, ___, K47, ___, ___, ___, ___, K4C, ___, K4E, K4F, K4G}, \
|
||||
}
|
||||
|
||||
#endif
|
319
keyboards/kmini/matrix.c
Executable file
319
keyboards/kmini/matrix.c
Executable file
@@ -0,0 +1,319 @@
|
||||
/* Copyright 2018 Maarten Dekkers <maartenwut@gmail.com>
|
||||
*
|
||||
* 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 <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#if defined(__AVR__)
|
||||
#include <avr/io.h>
|
||||
#endif
|
||||
#include "wait.h"
|
||||
#include "print.h"
|
||||
#include "debug.h"
|
||||
#include "util.h"
|
||||
#include "matrix.h"
|
||||
#include "timer.h"
|
||||
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#ifndef DEBOUNCING_DELAY
|
||||
# define DEBOUNCING_DELAY 5
|
||||
#endif
|
||||
|
||||
#define COL_SHIFTER ((uint32_t)1)
|
||||
|
||||
static uint16_t debouncing_time;
|
||||
static bool debouncing = false;
|
||||
|
||||
|
||||
static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS;
|
||||
|
||||
/* matrix state(1:on, 0:off) */
|
||||
static matrix_row_t matrix[MATRIX_ROWS];
|
||||
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
|
||||
|
||||
static void init_rows(void);
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col);
|
||||
static void unselect_cols(void);
|
||||
static void select_col(uint8_t col);
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_user(void) {}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_init_kb(void) {
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
__attribute__ ((weak))
|
||||
void matrix_scan_kb(void) {
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_rows(void) {
|
||||
return MATRIX_ROWS;
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t matrix_cols(void) {
|
||||
return MATRIX_COLS;
|
||||
}
|
||||
|
||||
void matrix_init(void) {
|
||||
unselect_cols();
|
||||
init_rows();
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
matrix_debouncing[i] = 0;
|
||||
}
|
||||
|
||||
matrix_init_quantum();
|
||||
}
|
||||
|
||||
uint8_t matrix_scan(void)
|
||||
{
|
||||
// Set col, read rows
|
||||
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
|
||||
bool matrix_changed = read_rows_on_col(matrix_debouncing, current_col);
|
||||
if (matrix_changed) {
|
||||
debouncing = true;
|
||||
debouncing_time = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = matrix_debouncing[i];
|
||||
}
|
||||
debouncing = false;
|
||||
}
|
||||
|
||||
matrix_scan_quantum();
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline
|
||||
bool matrix_is_on(uint8_t row, uint8_t col)
|
||||
{
|
||||
return (matrix[row] & ((matrix_row_t)1<col));
|
||||
}
|
||||
|
||||
inline
|
||||
matrix_row_t matrix_get_row(uint8_t row)
|
||||
{
|
||||
return matrix[row];
|
||||
}
|
||||
|
||||
void matrix_print(void)
|
||||
{
|
||||
print("\nr/c 0123456789ABCDEFGHIJKLMNOPQRSTUV \n");
|
||||
|
||||
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
|
||||
phex(row); print(": ");
|
||||
print_bin_reverse32(matrix_get_row(row));
|
||||
print("\n");
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t matrix_key_count(void)
|
||||
{
|
||||
uint8_t count = 0;
|
||||
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
|
||||
count += bitpop32(matrix[i]);
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col)
|
||||
{
|
||||
bool matrix_changed = false;
|
||||
|
||||
// Select col and wait for col selecton to stabilize
|
||||
select_col(current_col);
|
||||
wait_us(30);
|
||||
|
||||
// For each row...
|
||||
for(uint8_t row_index = 0; row_index < MATRIX_ROWS; row_index++)
|
||||
{
|
||||
// Store last value of row prior to reading
|
||||
matrix_row_t last_row_value = current_matrix[row_index];
|
||||
|
||||
// Check row pin state
|
||||
// Use the otherwise unused row: 3, col: 0 for caps lock
|
||||
if (row_index == 2 && current_col == 2) {
|
||||
// Pin E2 uses active low
|
||||
if ((_SFR_IO8(E2 >> 4) & _BV(E2 & 0xF)) == 0)
|
||||
{
|
||||
// Pin LO, set col bit
|
||||
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin HI, clear col bit
|
||||
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)))
|
||||
{
|
||||
// Pin HI, set col bit
|
||||
current_matrix[row_index] |= (COL_SHIFTER << current_col);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Pin LO, clear col bit
|
||||
current_matrix[row_index] &= ~(COL_SHIFTER << current_col);
|
||||
}
|
||||
}
|
||||
|
||||
// Determine if the matrix changed state
|
||||
if ((last_row_value != current_matrix[row_index]) && !(matrix_changed))
|
||||
{
|
||||
matrix_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Unselect cols
|
||||
unselect_cols();
|
||||
|
||||
return matrix_changed;
|
||||
}
|
||||
|
||||
/* Row pin configuration
|
||||
* row: 0 1 2 3 4
|
||||
* pin: D0 D1 D2 D3 D5
|
||||
*
|
||||
* Caps lock uses its own pin E2
|
||||
*/
|
||||
static void init_rows(void) {
|
||||
DDRD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // IN
|
||||
PORTD &= ~((1<<0)| (1<<1) | (1<<2) | (1<<3) | (1<<5)); // LO
|
||||
|
||||
DDRE &= ~(1<<2); // IN
|
||||
PORTE |= (1<<2); // HI
|
||||
}
|
||||
|
||||
/* Columns 0 - 16
|
||||
* col 0: B5
|
||||
* col 1: B6
|
||||
* These columns use a 74HC237D 3 to 8 bit demultiplexer.
|
||||
* A B C GL1
|
||||
* col / pin: PF0 PF1 PC7 PC6
|
||||
* 2: 0 0 0 1
|
||||
* 3: 1 0 0 1
|
||||
* 4: 0 1 0 1
|
||||
* 5: 1 1 0 1
|
||||
* 6: 0 0 1 1
|
||||
* 7: 1 0 1 1
|
||||
* 8: 0 1 1 1
|
||||
* 9: 1 1 1 1
|
||||
* col 10: E6
|
||||
* col 11: B0
|
||||
* col 12: B7
|
||||
* col 13: D4
|
||||
* col 14: D6
|
||||
* col 15: D7
|
||||
* col 16: B4
|
||||
*/
|
||||
static void unselect_cols(void) {
|
||||
DDRB |= (1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4); // OUT
|
||||
PORTB &= ~((1<<5) | (1<<6) | (1<<0) | (1<<7) | (1<<4)); // LO
|
||||
|
||||
DDRD |= (1<<4) | (1<<6) | (1<<7); // OUT
|
||||
PORTD &= ~((1<<4) | (1<<6) | (1<<7)); // LO
|
||||
|
||||
DDRE |= (1<<6); // OUT
|
||||
PORTE &= ~((1<<6)); // LO
|
||||
|
||||
DDRF |= (1<<0) | (1<<1); // OUT
|
||||
PORTF &= ~((1<<0) | (1<<1)); // LO
|
||||
|
||||
DDRC |= (1<<7) | (1<<6); // OUT
|
||||
PORTC &= ~((1<<7) | (1<<6)); // LO
|
||||
}
|
||||
|
||||
static void select_col(uint8_t col)
|
||||
{
|
||||
switch (col) {
|
||||
case 0:
|
||||
PORTB |= (1<<5); // HI
|
||||
break;
|
||||
case 1:
|
||||
PORTB |= (1<<6); // HI
|
||||
break;
|
||||
case 2:
|
||||
PORTC |= (1<<6); // HI
|
||||
break;
|
||||
case 3:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
break;
|
||||
case 4:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
break;
|
||||
case 5:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
break;
|
||||
case 6:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 7:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 8:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 9:
|
||||
PORTC |= (1<<6); // HI
|
||||
PORTF |= (1<<0); // HI
|
||||
PORTF |= (1<<1); // HI
|
||||
PORTC |= (1<<7); // HI
|
||||
break;
|
||||
case 10:
|
||||
PORTE |= (1<<6); // HI
|
||||
break;
|
||||
case 11:
|
||||
PORTB |= (1<<0); // HI
|
||||
break;
|
||||
case 12:
|
||||
PORTB |= (1<<7); // HI
|
||||
break;
|
||||
case 13:
|
||||
PORTD |= (1<<4); // HI
|
||||
break;
|
||||
case 14:
|
||||
PORTD |= (1<<6); // HI
|
||||
break;
|
||||
case 15:
|
||||
PORTD |= (1<<7); // HI
|
||||
break;
|
||||
case 16:
|
||||
PORTB |= (1<<4); // HI
|
||||
break;
|
||||
}
|
||||
}
|
13
keyboards/kmini/readme.md
Executable file
13
keyboards/kmini/readme.md
Executable file
@@ -0,0 +1,13 @@
|
||||
Kmini keyboard firmware
|
||||
======================
|
||||
|
||||
The Revo Kmini is a 65% keyboard with an additional two columns on the left. It is programmed with the 'KMAC key map', which only works on Windows and according to a [user](https://www.keebtalk.com/t/programming-revo-kmini/2107/7) it cannot map media controls or change the capslock key.
|
||||
|
||||
## Hardware
|
||||
Columns 0, 1 and 10-16 and rows 0-4 are wired directly to the ATmega32u4, and columns 2-9 are wired to the [74HC237D demultiplexer](https://www.mouser.de/datasheet/2/916/74HC237-1319445.pdf). Capslock is on E2 and also triggers a reset if held when plugging the cable in. There are three possible places for leds, which are the capslock key and the two keys above the right arrow key. All three of them are individually controllable. The ATmega32u4 runs on an external crystal on 8mhz, so you'll have to change the bitclock on the ISP programmer if you're unable to read or write the chip.
|
||||
|
||||
## How to build
|
||||
Please read the [documentation](https://docs.qmk.fm).
|
||||
|
||||
## How to flash
|
||||
Hold the capslock key while plugging in the USB and flash the .hex file using QMK Toolbox or Atmel FLIP.
|
71
keyboards/kmini/rules.mk
Executable file
71
keyboards/kmini/rules.mk
Executable file
@@ -0,0 +1,71 @@
|
||||
# Project specific files
|
||||
SRC = matrix.c
|
||||
|
||||
# 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 = 8000000
|
||||
|
||||
|
||||
#
|
||||
# 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
|
||||
# change yes to no to disable
|
||||
#
|
||||
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 = yes # Commands for debug and configuration
|
||||
CUSTOM_MATRIX = yes # Custom matrix file
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
@@ -47,37 +47,3 @@ 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_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,7 +1,5 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Layer 0, default layer
|
||||
@@ -84,37 +82,3 @@ 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_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1 +1,22 @@
|
||||
#include "melody96.h"
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
DDRC |= (1 << 6); PORTC &= ~(1 << 6);
|
||||
} else {
|
||||
DDRC &= ~(1 << 6); PORTC &= ~(1 << 6);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRC |= (1 << 7); PORTC &= ~(1 << 7);
|
||||
} else {
|
||||
DDRC &= ~(1 << 7); PORTC &= ~(1 << 7);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
DDRB |= (1 << 5); PORTB &= ~(1 << 5);
|
||||
} else {
|
||||
DDRB &= ~(1 << 5); PORTB &= ~(1 << 5);
|
||||
}
|
||||
}
|
@@ -3,14 +3,12 @@
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// I use a pro micro clocked at 8Mhz. It can't reach 1M baud, so this is the
|
||||
// next fastest possible baud without errors. I don't notice any difference in
|
||||
// behavior at this slower speed. (So I think it should maybe be the default,
|
||||
// to allow a single codebase to support both available flavors of pro micro.)
|
||||
// This requires a corresponding change to the wireless module firmware; see
|
||||
// https://github.com/reversebias/mitosis/pull/10
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
// I want to place an underscore as tap behavior on the right shift key. But
|
||||
// RSFT_T(KC_UNDS) doesn't work; mod-tap doesn't work with pre-shifted keys. So
|
||||
// instead we take advantage of Space Cadet Shift that does something similar
|
||||
// and just tweak it to use the -_ key instead of 0) See
|
||||
// https://github.com/qmk/qmk_firmware/pull/2055
|
||||
#define RSPC_KEY KC_MINS
|
||||
|
||||
// TODO: figure out which of these I can safely enable to reduce firmware size.
|
||||
//#define NO_ACTION_LAYER
|
||||
@@ -19,4 +17,16 @@
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#define AUDIO_VOICES
|
||||
#define AUDIO_CLICKY
|
||||
#define C6_AUDIO
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@@ -1,4 +1,7 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
#ifdef AUDIO_ENABLE
|
||||
#include "audio.h"
|
||||
#endif
|
||||
|
||||
enum mitosis_layers
|
||||
{
|
||||
@@ -10,57 +13,53 @@ enum mitosis_layers
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define XXXXXXX KC_NO // No-op (no key in this location on Mitosis' fake matrix)
|
||||
#define _______ KC_TRNS // Transparent, because I haven't decided a mapping yet
|
||||
#define KC_LMTA KC_LALT // For fun, name the mods like the space cadet keyboard does
|
||||
#define KC_RMTA KC_RALT // META
|
||||
#define KC_LSUP KC_LGUI // SUPER
|
||||
#define KC_RSUP KC_RGUI //
|
||||
#define KC_RHYP KC_INT4 // HYPER (actually muhenkan 無変換 and henkan 変換)
|
||||
#define KC_LHYP KC_INT5 // or NFER/XFER.
|
||||
#define _______ KC_TRNS // Transparent
|
||||
|
||||
// I don't use Japanese myself, but I've placed henkan 変換 and muhenkan 無変換
|
||||
// in my layout to act as left and right HYPER
|
||||
|
||||
// Momentary tri-state layers. Mitosis default keymap does this too but employs
|
||||
// new keymappings and a bunch of conditional code. This simpler keymap
|
||||
// accomplishes it, but with a small quirk: triggering both layers then
|
||||
// releasing one out-of-order will leave the tri-state triggered until the
|
||||
// other is released. Which doesn't bother me.
|
||||
// accomplishes it but with a small quirk: triggering both layers then releasing
|
||||
// one out-of-order will leave the tri-state triggered until the other is
|
||||
// released. Which doesn't bother me.
|
||||
|
||||
// The weird /*,*/ comments are a hack to get slightly better automatic
|
||||
// tabulation in my editor.
|
||||
|
||||
// We use Space Cadet KC_RSPC to get _ on right shift. See config.h for details.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_xQ] = 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, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
KC_LSUP, KC_LCTL, MO(_xN), SFT_T(KC_TAB), KC_RSFT, MO(_xN), KC_RCTL, KC_RSUP,
|
||||
KC_LHYP, KC_LMTA, MO(_xS), KC_BSPC, KC_SPC, MO(_xS), KC_RMTA, KC_RHYP
|
||||
),
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ KC_LGUI, KC_LCTL, MO(_xS), KC_TAB, KC_SPC, MO(_xS), KC_RCTL, KC_RGUI,
|
||||
/*, */ KC_HENK, KC_LALT, MO(_xN), KC_LSFT, KC_RSPC, MO(_xN), KC_RALT, KC_MHEN),
|
||||
[_xW] = LAYOUT(
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,
|
||||
KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I,
|
||||
KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, KC_COMM, KC_DOT, KC_QUOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xS] = LAYOUT(
|
||||
KC_ESC, _______, KC_UP, _______, _______, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_TILD,
|
||||
KC_TAB, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_CIRC, KC_AMPR, KC_PIPE, KC_GRV, KC_UNDS,
|
||||
KC_BSLS, KC_RPRN, KC_RCBR, KC_RBRC, KC_RABK, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_SLSH,
|
||||
_______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______,
|
||||
_______, _______, _______, KC_DEL, KC_ENT, _______, _______, _______
|
||||
),
|
||||
KC_ESC, KC_GRV , KC_UP, KC_EQL , KC_TILD, KC_PLUS, KC_CIRC, KC_AMPR, KC_PERC, KC_MINS,
|
||||
KC_BSPC, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_PIPE, KC_AT, KC_DLR, KC_HASH, KC_ENT,
|
||||
KC_BSLS, KC_LABK, KC_LCBR, KC_LPRN, KC_LBRC, KC_RBRC, KC_RCBR, KC_RPRN, KC_RABK, KC_SLSH,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), _______, _______),
|
||||
[_xN] = LAYOUT(
|
||||
_______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_P0,
|
||||
_______, _______, _______, _______, _______, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
_______, _______, _______, _______, _______, KC_PMNS, KC_P1, KC_P2, KC_P3, KC_PEQL,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, MO(_xF), _______, KC_PENT, MO(_xF), _______, _______
|
||||
),
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_PPLS, KC_7, KC_8, KC_9, KC_PMNS,
|
||||
_______, KC_F4, KC_F5, KC_F6, KC_F11, KC_NLCK, KC_4, KC_5, KC_6, KC_PENT,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F12, KC_PAST, KC_1, KC_2, KC_3, KC_PSLS,
|
||||
/*, */ _______, _______, MO(_xF), _______, _______, MO(_xF), KC_0, KC_PDOT,
|
||||
/*, */ _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
[_xF] = LAYOUT(
|
||||
_______, _______, KC_PGUP, _______, KC_VOLU, KC_F13, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
_______, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_F14, KC_F4, KC_F5, KC_F6, KC_F11,
|
||||
TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_F15, KC_F1, KC_F2, KC_F3, KC_F12,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
RESET, KC_INS, KC_PGUP, KC_DEL, KC_VOLU, KC_PPLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||
CK_TOGG, KC_HOME, KC_PGDN, KC_END, KC_VOLD, KC_NLCK, KC_P4, KC_P5, KC_P6, KC_PENT,
|
||||
TG(_xW), KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_PAST, KC_P1, KC_P2, KC_P3, KC_PSLS,
|
||||
/*, */ CK_UP, MU_TOG, _______, _______, _______, _______, KC_P0, KC_PDOT,
|
||||
/*, */ CK_DOWN, MU_MOD, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS),
|
||||
};
|
||||
|
||||
// This is a hack to place <question mark> on <shift-comma> and <exclaimation
|
||||
@@ -105,6 +104,41 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
float tone_dyn_macro_rec[][2] = SONG(DVORAK_SOUND);
|
||||
float tone_dyn_macro_play[][2] = SONG(COLEMAK_SOUND);
|
||||
float tone_fnpc[][2] = SONG(PLOVER_SOUND);
|
||||
float tone_fnmac[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
|
||||
void startup_user()
|
||||
{
|
||||
float tone_startup[][2] = SONG(STARTUP_SOUND);
|
||||
_delay_ms(20); // gets rid of tick
|
||||
PLAY_SONG(tone_startup);
|
||||
}
|
||||
|
||||
void shutdown_user()
|
||||
{
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
PLAY_SONG(tone_goodbye);
|
||||
_delay_ms(150);
|
||||
stop_all_notes();
|
||||
}
|
||||
|
||||
void music_on_user(void)
|
||||
{
|
||||
music_scale_user();
|
||||
}
|
||||
|
||||
void music_scale_user(void)
|
||||
{
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
PLAY_SONG(music_scale);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Set the bits of A selected by MASK to the corresponding bits of B
|
||||
#define setbits(A, B, MASK) A = (A & (B | ~MASK)) | (B & MASK)
|
||||
void matrix_scan_user(void) {
|
||||
|
@@ -1,12 +1,9 @@
|
||||

|
||||
|
||||
[Keyboard layout editor source](http://www.keyboard-layout-editor.com/#/gists/9cf33be8a8e773647cfa44a0dbc44b31)
|
||||
|
||||
# a layout for the Mitosis
|
||||
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged
|
||||
symmetrically, but distinguishable left/right by the OS. Shift, Red
|
||||
("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper.
|
||||
- Emphasis on momentary modifiers, all usable from either hand, arranged symmetrically, but left/right distinguishable by the OS.
|
||||
Shift, Red ("Lower"), Blue ("Raise"), Super ("Windows"), Meta ("Alt"), Hyper (actually Henkan/Muhenkan).
|
||||
I'm going for a [Space Cadet](https://en.wikipedia.org/wiki/Space-cadet_keyboard) aesthetic;
|
||||
I want a keyboard that can (even just in theory) make use of all the bucky bits my operating system can support.
|
||||
|
||||
- Red and Blue are used to momentary-enable (like a shift key) one of three layers:
|
||||
|
||||
@@ -14,80 +11,211 @@
|
||||
- Blue: Numbers layer
|
||||
- "Purple" (both Red and Blue): Functions layer
|
||||
|
||||
- The base layer is QWERTY. A slight variant of [Workman][] may be toggled-on.
|
||||
- The base layer is QWERTY.
|
||||
A slight variant of [Workman][] may be toggled using `Red`+`Blue`+`Z`.
|
||||
|
||||
- Emphasis on minimizing hand travel, so as not to lose orientation with
|
||||
homerow.
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged
|
||||
symmetrically in the symbols layer.
|
||||
- Minimize hand travel, so as not to lose orientation with home row.
|
||||
|
||||
- `?` and `!` are moved to take the place of `<` and `>`. Rationale: unmodded
|
||||
and shifted keys should be for prose, while symbols useful for programming
|
||||
should be colocated on their own layer.
|
||||
|
||||
- No OS keymap modification required.
|
||||
- Key positions chosen for mnemonics.
|
||||
For example, you can distinguish between alphanumeric numerals and keypad numerals, but they occupy the same key positions.
|
||||
|
||||
## Layout Images
|
||||
|
||||

|
||||
|
||||
Base layer. Notes:
|
||||
- customized comma and period, which have exclamation point and question mark on their shift layer.
|
||||
- tap right-shift for underscore
|
||||
|
||||

|
||||
|
||||
Red layer. Intended for common navigation and programming symbols. Notes:
|
||||
- symmetric layout of paired braces/brackets/slashes for easier memorization
|
||||
- arrows placed directly on home position
|
||||
|
||||

|
||||
|
||||
Blue layer. Intended for "number pad." Notes:
|
||||
- Keycodes generated for numbers, enter key, and mathematical symbols are from the alphanumeric keys, not keypad. This way they are not influenced by the state of Num Lock. If you want to send the keypad equivalents, just use Red and Blue modifiers simultaneously.
|
||||
|
||||

|
||||
|
||||
Purple (Red+Blue) layer. Intended for "true keypad" and various functions. Notes:
|
||||
- Numbers on this layer send Keypad codes, so the result will be affected by the state of Num Lock.
|
||||
- "Switch Layout" toggles the alphabet keys between QWERTY and Workman
|
||||
- Page Up / Page Down / Home / End are placed on similar arrows
|
||||
- To press Print Screen it is necessary to use the left-side Red and Blue modifiers.
|
||||
|
||||
Keyboard layout editor sources:
|
||||
[base](http://www.keyboard-layout-editor.com/#/gists/bc2d06a3203d1bc3a14ed2245cf39643)
|
||||
[red](http://www.keyboard-layout-editor.com/#/gists/dbbf65f726a5522824b75117a62a321e)
|
||||
[blue](http://www.keyboard-layout-editor.com/#/gists/240e807f3d7e1d3ddabe1b69ee675048)
|
||||
[purple](http://www.keyboard-layout-editor.com/#/gists/9559f0f8bb1ee47677c8f2b4d766829d)
|
||||
|
||||
[Imgur album](https://imgur.com/a/KSoVgPx)
|
||||
|
||||
## Design notes
|
||||
|
||||
- **I use an 8Mhz Pro Micro.** If you want to use this keymap with the standard
|
||||
16Mhz Pro Micro specified in the Mitosis design:
|
||||
### Workman layout
|
||||
|
||||
- Remove the lines in `rules.mk` mentioning `F_CPU` and `F_USB`.
|
||||
- Remove the lines in `config.h` mentioning `SERIAL_UART_BAUD`.
|
||||
- I'm learning a new physical key placement, so I might as well go all-out and
|
||||
use an optimal non-QWERTY layout.
|
||||
|
||||
- Workman layout
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a standard
|
||||
column-staggered keyboard so is probably not as optimal as one could achieve
|
||||
on an ergonomic board like the Mitosis. Maybe run an optimizer routine after I
|
||||
determine good values for key difficulty on the Mitosis.
|
||||
|
||||
- I'm learning a new physical key placement, so I might as well go all out
|
||||
and use an optimal non-QWERTY layout.
|
||||
### 8Mhz Pro Micro
|
||||
|
||||
- I like the way Workman feels and some of its advantages over Colemak.
|
||||
Unfortunately, it was designed using a weighting system based on a
|
||||
standard column-staggered keyboard so is probably not as optimal as one
|
||||
could achieve on an ergonomic board like the Mitosis. Maybe run an
|
||||
optimizer routine after I determine good values for key difficulty on the
|
||||
Mitosis.
|
||||
- I (used to) use a 3.3v Pro Micro clocked at 8Mhz rather than the 5v 16Mhz specified in the Mitosis design.
|
||||
That can't communicate with the connected wireless module at the default speed of 1M baud.
|
||||
The next fastest baudrate that works without errors is 250k baud.
|
||||
So if you want to do the same:
|
||||
|
||||
- Arrows in the home position (on a layer). Mod+Arrows = PgUp/PgDn/Home/End,
|
||||
which is intuitive for me
|
||||
- Set the Pro Micro clock rate correctly in `rules.mk`:
|
||||
```
|
||||
F_CPU = 800000
|
||||
```
|
||||
- Configure it to communicate at 250k baud in `config.h`:
|
||||
```
|
||||
#undef SERIAL_UART_BAUD // avoids redefinition warning
|
||||
#define SERIAL_UART_BAUD 250000
|
||||
```
|
||||
- Configure the receiver's wireless module to communicate at 250k baud in `main.c`. See https://github.com/reversebias/mitosis/pull/10
|
||||
```
|
||||
- UART_BAUDRATE_BAUDRATE_Baud1M
|
||||
+ UART_BAUDRATE_BAUDRATE_Baud250000
|
||||
```
|
||||
|
||||
- I use tab all the time for autocompletion. To allow it to live on the base
|
||||
layer it is now Mod-Tapped with left shift.
|
||||
### Layout mnemonics
|
||||
|
||||
- Paired programming symbols (braces, brackets, parentheses) are arranged symmetrically in the Red layer.
|
||||
|
||||
- Arrow keys are in the home position on the Red layer.
|
||||
|
||||
- Blue+Arrows = PgUp/PgDn/Home/End, which is intuitive for me.
|
||||
|
||||
- The number pad: I placed the ten-key number pad on the Blue layer.
|
||||
However, this would do the wrong thing when Num Lock was not enabled.
|
||||
Rather than attempt to manage the state of Num Lock, I arranged the normal number keys in a ten-key layout on the Blue layer instead.
|
||||
If you explicitly want the keypad keys, they're in the same position on the Red+Blue layer.
|
||||
|
||||
- Number-pad add, subtract, multiply, and divide are located on the same keys as alphanumeric plus, dash, asterisk, and slash, respectively.
|
||||
|
||||
- The Function-keys are arranged to mimic the order of the ten-key pad.
|
||||
|
||||
- Enter is now in a more qwerty-familiar location, and may be activated with one hand.
|
||||
Numpad Enter is in the same position.
|
||||
|
||||
- Rather than place Backspace opposite Space, I intentionally place it on a layer where it takes some effort to activate.
|
||||
Backspace is one of the keys I most dislike on a QWERTY keyboard because it moves me away from homerow and I need to use it so often.
|
||||
Rather than make it easier to strike, I want to discourage myself from using it by learning to type more accurately.
|
||||
|
||||
- Why do I dislike [snake\_case](https://en.wikipedia.org/wiki/Snake_case) (`__variable_names_that_use_underscores_`)?
|
||||
Maybe because it's hard to type all those underscores requiring the shift key?
|
||||
Hypothesis: I'll be less annoyed by snake case by placing `_` at an unmodded position, right near the `space` key.
|
||||
|
||||
|
||||
## Changelog
|
||||
|
||||
### Current
|
||||
|
||||
- Experiment: no-modifier underscore on right shift key.
|
||||
- New combined numbers + keypad arrangement.
|
||||
No more worrying about Num Lock key.
|
||||
- Move F-keys to left board to make room.
|
||||
Calling them "the Numbers layer" and "the Functions layer" is now less accurate but the arrangement feels better.
|
||||
- Audio working!
|
||||
- Move Tab and Space to upper thumb row.
|
||||
I discarded the high-profile acrylic case from my Mitosis.
|
||||
With a low-profile case, it's easier to hit the upper row of thumb keys.
|
||||
- Discard all my `#defines` for "Meta", "Super", and "Hyper".
|
||||
I can call them that without making the code confusing to others.
|
||||
- Move Backspace to Red+A. I shouldn't be using it much anyway.
|
||||
This means Tab and Shift might as well be separate keys again.
|
||||
- Distribute paired symbols symmetrically across boards like `\<{([ ])}>/`.
|
||||
Opening-symbols on the right hand was a failed experiment.
|
||||
- Change default back to target a 16Mhz/5v Pro Micro.
|
||||
I damaged the 8Mhz Pro Micro I was using so now I'm back to using a 16mhz Pro Micro again.
|
||||
|
||||
### 0.6.1
|
||||
|
||||
- Place Tab on Shift without a modifier. We use it frequently for autocomplete.
|
||||
- Make QWERTY the default layout. So more people can try it out. My customized Workman is easily toggled-on.
|
||||
- Don't use redundant `#define` for `KC_TRNS`
|
||||
- Place Num Lock somewhere. Otherwise (if it gets turned off) we can't type any numbers!
|
||||
- Add some media keys
|
||||
|
||||
### 0.5.155
|
||||
|
||||
- Enable use with my 3.3v Pro Micro
|
||||
- Add a toggle-able QWERTY layer
|
||||
- Golf down the LED-setting code
|
||||
- Place `!` and `?` on `Shift`+`,` and `Shift`+`.`.
|
||||
- Distribute paired symbols symmetrically across boards like `\)}]> <[{(/`
|
||||
|
||||
### 0.5.129
|
||||
|
||||
- A modified Workman variant for Mitosis
|
||||
- Arrows in home position, modifier + Arrow = PgUp/PgDn/Home/End
|
||||
- Load all paired symbols onto angle-bracket keys.
|
||||
|
||||
### Abandoned ideas
|
||||
|
||||
- ~~"Since QWERTY and Workman keep angle brackets together, place other
|
||||
- "Since QWERTY and Workman keep angle brackets together, place other
|
||||
enclosing symbols on the same keys. This informs the numbers placement,
|
||||
which informs the function-key placement."~~
|
||||
which informs the function-key placement."
|
||||
|
||||
- I tried this and it was bad. I don't like having to pick the right
|
||||
modifier to get the right flavor of bracket. Instead, now, one modifier
|
||||
activates a symbols layer where all brackets are easily accessible.
|
||||
|
||||
- Space/Enter to the left of layer select for Enter doesn't work well; I always
|
||||
trigger space first when mashing the keys simultaneously. This might not
|
||||
continue to be true if I change the angle at which I strike the keys e.g.
|
||||
with a neoprene base or a wrist support.
|
||||
- Space/Enter to the left of layer select for Enter
|
||||
|
||||
- Doesn't work well; I always trigger space first when mashing the keys
|
||||
simultaneously. ~~This might not continue to be true if I change the angle
|
||||
at which I strike the keys e.g. with a neoprene base or a wrist support.~~
|
||||
Even with a wrist rest or low-profile, this is hard to do with one hand.
|
||||
Need to adjust the firmware to understand chorded thumb keys.
|
||||
|
||||
- I used to have Blue on ring finger, but that was too hard to use in
|
||||
conjunction with shift.
|
||||
|
||||
## To do
|
||||
|
||||
- Figure out where to place non-numpad numbers so we don't need num lock turned
|
||||
on to type them?
|
||||
- Improve LED indications (may require modding bluetooth firmware):
|
||||
- **Shared Layouts.**
|
||||
Figure out how to make use of QMK's common `layouts/`
|
||||
- **Chorded Combos.**
|
||||
Since the thumb keys are arranged such that it's easy to smash pairs of keys with just one thumb, figure out how to enable chording.
|
||||
For example, a single-finger Shift+Space or Red+Space that doesn't do the wrong thing if Space happens to trigger first.
|
||||
- Improve **LED indications** (may require modding bluetooth firmware):
|
||||
- Num Lock status
|
||||
- Is any board nonresponsive (which one?)
|
||||
- Does either board have a low battery?
|
||||
- Add Insert, PrintScr, Pause/Break
|
||||
- ~~Make QWERTY base layer for people who customize layout in software?~~ I
|
||||
default to QWERTY now.
|
||||
- **Num Lock management.**
|
||||
Num lock currently occupies prime real estate, but I never use it except to fix it when it's wrong.
|
||||
Do any of my applications use it?
|
||||
Should I have the firmware ensure it is set how I want it?
|
||||
Maybe cause it to be momentary active with Blue?
|
||||
See [@drashna's comment](https://github.com/qmk/qmk_firmware/pull/2366#issuecomment-404951953)
|
||||
- Store default base layer in eeprom?
|
||||
- See if the henkan/muhenkan placement is at all useful for Japanese speakers,
|
||||
or abuse different keysyms for Left/Right Hyper. (Original space cadet used
|
||||
scancodes 145/175. 145 is LANG2, 175 is "reserved" in USB HID spec.)
|
||||
- Mod a buzzer onto my receiver and enable tones
|
||||
- Implement "layer lock" key
|
||||
- Improve tri-layer behavior
|
||||
- Find a better location for PrintScr/SysRq, Scroll Lock, Pause/Break, Caps Lock.
|
||||
- ~~Figure out where to place non-numpad numbers so we don't need num lock turned
|
||||
on to type them?~~
|
||||
- ~~Add Insert, PrintScr, Pause/Break~~
|
||||
- ~~Make QWERTY base layer for people who customize layout in software?~~
|
||||
I default to QWERTY now.
|
||||
- ~~Mod a buzzer onto my receiver and enable tones~~ Easy and works!
|
||||
|
||||
[Workman]: https://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
|
||||
|
@@ -1,8 +1,5 @@
|
||||
# I use an 8Mhz Pro Micro
|
||||
F_CPU = 8000000
|
||||
# Necessary, with above change?
|
||||
F_USB = $(F_CPU)
|
||||
|
||||
AUDIO_ENABLE = yes # audio output
|
||||
FAUXCLICKY_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
|
@@ -1,5 +1,5 @@
|
||||
# AJP10304 Custom Planck Layout
|
||||
# Also available for the JJ40
|
||||
# Also available for the Atreus50 and JJ40
|
||||
|
||||
**Note:** In the tables below where there are two characters on a key,
|
||||
the second is the output when shift is applied.
|
||||
|
47
keyboards/planck/keymaps/andylikescandy/config.h
Normal file
47
keyboards/planck/keymaps/andylikescandy/config.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
#define STARTUP_SONG SONG(PLANCK_SOUND)
|
||||
// #define STARTUP_SONG SONG(NO_SOUND)
|
||||
|
||||
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
|
||||
SONG(COLEMAK_SOUND), \
|
||||
SONG(DVORAK_SOUND) \
|
||||
}
|
||||
#endif
|
||||
|
||||
#define MUSIC_MASK (keycode != KC_NO)
|
||||
|
||||
#define PERMISSIVE_HOLD
|
||||
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
|
||||
#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 2
|
||||
|
||||
#endif
|
288
keyboards/planck/keymaps/andylikescandy/keymap.c
Normal file
288
keyboards/planck/keymaps/andylikescandy/keymap.c
Normal file
@@ -0,0 +1,288 @@
|
||||
/* Copyright 2015-2017 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 "planck.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum planck_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST,
|
||||
_NAVIGATION
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
BACKLIT,
|
||||
EXT_PLV
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
#define _NAVIGATION 8
|
||||
#define NAVL MO(_NAVIGATION)
|
||||
#define NAVSPC LT( 8, KC_SPC)
|
||||
//#define SHFTENT SHFT_T(KC_ENT)
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
|
||||
{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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |SftEnt|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT},
|
||||
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Dvorak REUSED AS COLEMAK
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Shift |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | CS | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = {
|
||||
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_QUOT},
|
||||
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT) },
|
||||
{KC_LCTL, LCTL(KC_LSFT), KC_LGUI, KC_LALT, LOWER, NAVSPC, NAVSPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
// /* Dvorak
|
||||
// * ,-----------------------------------------------------------------------------------.
|
||||
// * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
// * |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
// * | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
// * |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
// * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
// * |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
// * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
// * `-----------------------------------------------------------------------------------'
|
||||
// */
|
||||
// [_DVORAK] = {
|
||||
// {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
|
||||
// {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
|
||||
// {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
|
||||
// {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, NAVSPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
// },
|
||||
//
|
||||
// /* Lower
|
||||
// * ,-----------------------------------------------------------------------------------.
|
||||
// * | ~ | F7 | F8 | F9 | F10 | F11 | F12 | _ | + | { | } | Bksp |
|
||||
// * |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
// * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | |
|
||||
// * |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
// * | |Ctl+z |Ctl+x |Ctl+c |Ctl+v | | | | | | |Enter |
|
||||
// * |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
// * | | | | | | | | HOME | PGDN | PGUP | END |
|
||||
// * `-----------------------------------------------------------------------------------'
|
||||
// */
|
||||
[_LOWER] = {
|
||||
{ KC_TILD, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSPC },
|
||||
{ KC_DEL , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_PIPE },
|
||||
{ _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), _______, _______, _______, _______, _______, _______, KC_ENT },
|
||||
{ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
|
||||
},
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | HOME | PGDN | PGUP | END |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
{ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC },
|
||||
{ KC_DEL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS },
|
||||
{ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_ENT },
|
||||
{ _______, _______, _______, _______, _______, KC_SPC, KC_SPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END }
|
||||
},
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = {
|
||||
{KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 },
|
||||
{XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC},
|
||||
{XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT},
|
||||
{EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Reset| | | | | | | | | | | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |C.A.D.| | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | CAPS | | | | | | |Insert|PntScn|Scroll|Pause | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | |Qwerty|Colemk|Dvorak|Plover|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{RESET, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX },
|
||||
{LALT(LCTL(KC_DEL)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX},
|
||||
{KC_CAPSLOCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, KC_SLCK, KC_PAUS, XXXXXXX},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, XXXXXXX} //PLOVER}
|
||||
},
|
||||
/* Navigation
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | | | | | | | Home | PgDn | PgUp | End |ctlBsp|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del |Ctl+A | |Shift | Ctrl | | | Left | Down | Up |Right | Del |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | C+S |Ctl+z |Ctl+x |Ctl+c |Ctl+v | | | |Shift |Shift |Shift |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* |C+A+S | | | | | | |C+Left|C+Down| C+Up |C+Right|
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_NAVIGATION] = {
|
||||
{XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, LCTL(KC_BSPC) },
|
||||
{KC_DEL, LCTL(KC_A), XXXXXXX, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL},
|
||||
{LCTL(KC_LSFT), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT, KC_RSFT, KC_RSFT, KC_ENT},
|
||||
{_______, _______, _______, _______, _______, _______, _______, LCTL(KC_LEFT), LCTL(KC_DOWN), LCTL(KC_UP), LCTL(KC_RGHT), _______}
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float plover_song[][2] = SONG(PLOVER_SOUND);
|
||||
float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND);
|
||||
#endif
|
||||
|
||||
uint32_t layer_state_set_user(uint32_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
PORTE &= ~(1<<6);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
PORTE |= (1<<6);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(plover_song);
|
||||
#endif
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_SONG(plover_gb_song);
|
||||
#endif
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
2
keyboards/planck/keymaps/andylikescandy/readme.md
Normal file
2
keyboards/planck/keymaps/andylikescandy/readme.md
Normal file
@@ -0,0 +1,2 @@
|
||||
# The Default Planck Layout
|
||||
|
0
keyboards/planck/keymaps/andylikescandy/rules.mk
Normal file
0
keyboards/planck/keymaps/andylikescandy/rules.mk
Normal file
@@ -6,8 +6,8 @@ extern keymap_config_t keymap_config;
|
||||
#define G(X) LGUI(X)
|
||||
#define A(X) LALT(X)
|
||||
#define C(X) LCTL(X)
|
||||
#define GC(X) G(C(X))
|
||||
#define GAC(X) G(A(C(X)))
|
||||
#define AC(X) A(C(X))
|
||||
#define SC(X) S(C(X))
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
@@ -16,242 +16,249 @@ enum planck_layers {
|
||||
_QWERTY,
|
||||
_SYMB,
|
||||
_MOVE,
|
||||
_FUNC
|
||||
_FUNC,
|
||||
};
|
||||
|
||||
enum planck_keycodes {
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
SYMB,
|
||||
MOVE,
|
||||
FUNC
|
||||
COLEMAK = SAFE_RANGE,
|
||||
QWERTY,
|
||||
SYMB,
|
||||
MOVE,
|
||||
FUNC,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* COLEMAK
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | K | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Super| Alt |Ctrl |Symb |Enter|Space|Move |Ctrl | Alt |Super|Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_F,
|
||||
KC_P, KC_G, KC_J, KC_L,
|
||||
KC_U, KC_Y, KC_SCLN, KC_MINS
|
||||
},
|
||||
{
|
||||
KC_BSPC, KC_A, KC_R, KC_S,
|
||||
KC_T, KC_D, KC_H, KC_N,
|
||||
KC_E, KC_I, KC_O, KC_QUOT
|
||||
},
|
||||
{
|
||||
KC_LSFT, KC_Z, KC_X, KC_C,
|
||||
KC_V, KC_B, KC_K, KC_M,
|
||||
KC_COMM, KC_DOT, KC_SLSH, KC_RSFT
|
||||
},
|
||||
{
|
||||
FUNC, KC_LGUI, KC_LALT, KC_LCTL,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, FUNC
|
||||
}
|
||||
},
|
||||
/* COLEMAK
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | F | P | G | J | L | U | Y | ; | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | R | S | T | D | H | N | E | I | O | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | K | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_F,
|
||||
KC_P, KC_G, KC_J, KC_L,
|
||||
KC_U, KC_Y, KC_SCLN, KC_MINS
|
||||
},
|
||||
{
|
||||
KC_BSPC, KC_A, KC_R, KC_S,
|
||||
KC_T, KC_D, KC_H, KC_N,
|
||||
KC_E, KC_I, KC_O, KC_QUOT
|
||||
},
|
||||
{
|
||||
KC_LSFT, KC_Z, KC_X, KC_C,
|
||||
KC_V, KC_B, KC_K, KC_M,
|
||||
KC_COMM, KC_DOT, KC_SLSH, KC_RSFT
|
||||
},
|
||||
{
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RGUI, KC_RALT, KC_RCTL, FUNC
|
||||
}
|
||||
},
|
||||
|
||||
/* QWERTY
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | N | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Super| Alt |Ctrl |Symb |Enter|Space|Move |Ctrl | Alt |Super|Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_E,
|
||||
KC_R, KC_T, KC_Y, KC_U,
|
||||
KC_I, KC_O, KC_P, KC_MINS
|
||||
},
|
||||
{
|
||||
KC_BSPC, KC_A, KC_S, KC_D,
|
||||
KC_F, KC_G, KC_H, KC_J,
|
||||
KC_K, KC_L, KC_SCLN, KC_QUOT
|
||||
},
|
||||
{
|
||||
KC_LSFT, KC_Z, KC_X, KC_C,
|
||||
KC_V, KC_B, KC_N, KC_M,
|
||||
KC_COMM, KC_DOT, KC_SLSH, KC_RSFT
|
||||
},
|
||||
{
|
||||
FUNC, KC_LGUI, KC_LALT, KC_LCTL,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RCTL, KC_RALT, KC_RGUI, FUNC
|
||||
}
|
||||
},
|
||||
/* QWERTY
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Tab | Q | W | E | R | T | Y | U | I | O | P | - |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Bksp | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Shift| Z | X | C | V | B | N | M | , | . | / |Shift|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Func |Ctrl | Alt |Super|Symb |Enter|Space|Move |Super| Alt |Ctrl |Func |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
{
|
||||
KC_TAB, KC_Q, KC_W, KC_E,
|
||||
KC_R, KC_T, KC_Y, KC_U,
|
||||
KC_I, KC_O, KC_P, KC_MINS
|
||||
},
|
||||
{
|
||||
KC_BSPC, KC_A, KC_S, KC_D,
|
||||
KC_F, KC_G, KC_H, KC_J,
|
||||
KC_K, KC_L, KC_SCLN, KC_QUOT
|
||||
},
|
||||
{
|
||||
KC_LSFT, KC_Z, KC_X, KC_C,
|
||||
KC_V, KC_B, KC_N, KC_M,
|
||||
KC_COMM, KC_DOT, KC_SLSH, KC_RSFT
|
||||
},
|
||||
{
|
||||
FUNC, KC_LCTL, KC_LALT, KC_LGUI,
|
||||
SYMB, KC_ENT, KC_SPC, MOVE,
|
||||
KC_RGUI, KC_RALT, KC_RCTL, FUNC
|
||||
}
|
||||
},
|
||||
|
||||
/* SYMB
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYMB] = {
|
||||
{
|
||||
KC_ESC, KC_1, KC_2, KC_3,
|
||||
KC_4, KC_5, KC_6, KC_7,
|
||||
KC_8, KC_9, KC_0, _______
|
||||
},
|
||||
{
|
||||
KC_DEL, KC_EXLM, KC_AT, KC_HASH,
|
||||
KC_DLR, KC_PERC, KC_CIRC, KC_AMPR,
|
||||
KC_ASTR, KC_LPRN, KC_RPRN, _______
|
||||
},
|
||||
{
|
||||
_______, KC_TILD, KC_GRV, KC_PLUS,
|
||||
KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC,
|
||||
KC_RBRC, KC_LCBR, KC_RCBR, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
/* SYMB
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | ~ | ` | + | = | | | \ | [ | ] | { | } | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_SYMB] = {
|
||||
{
|
||||
KC_ESC, KC_1, KC_2, KC_3,
|
||||
KC_4, KC_5, KC_6, KC_7,
|
||||
KC_8, KC_9, KC_0, _______
|
||||
},
|
||||
{
|
||||
KC_DEL, KC_EXLM, KC_AT, KC_HASH,
|
||||
KC_DLR, KC_PERC, KC_CIRC, KC_AMPR,
|
||||
KC_ASTR, KC_LPRN, KC_RPRN, _______
|
||||
},
|
||||
{
|
||||
_______, KC_TILD, KC_GRV, KC_PLUS,
|
||||
KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC,
|
||||
KC_RBRC, KC_LCBR, KC_RCBR, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* MOVE
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | |Home | Up | End | | Esc |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |Left |Down |Right|Caps | Del |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |PgDn |PgUp | | | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOVE] = {
|
||||
{
|
||||
GC(KC_UP), GAC(KC_1), G(KC_6), G(KC_5),
|
||||
G(KC_4), GAC(KC_UP), GAC(KC_RGHT), KC_HOME,
|
||||
KC_UP, KC_END, C(KC_SPC), KC_ESC
|
||||
},
|
||||
{
|
||||
GC(KC_DOWN), GAC(KC_2), G(KC_3), G(KC_2),
|
||||
G(KC_1), G(KC_F), G(KC_C), KC_LEFT,
|
||||
KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL
|
||||
},
|
||||
{
|
||||
_______, GAC(KC_3), G(KC_9), G(KC_8),
|
||||
G(KC_7), GAC(KC_LEFT), GAC(KC_DOWN), KC_PGDN,
|
||||
KC_PGUP, GC(KC_LEFT), GC(KC_RGHT), _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | F21 | F22 | F23 | F24 | | | | |Clmak|Qwrty| |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | |Prev |Mute |Play |Next | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = {
|
||||
{
|
||||
RESET, KC_F1, KC_F2, KC_F3,
|
||||
KC_F4, KC_F5, KC_F6, KC_F7,
|
||||
KC_F8, KC_F9, KC_F10, KC_VOLU
|
||||
},
|
||||
{
|
||||
KC_POWER, KC_F11, KC_F12, KC_F13,
|
||||
KC_F14, KC_F15, KC_F16, KC_F17,
|
||||
KC_F18, KC_F19, KC_F20, KC_VOLD
|
||||
},
|
||||
{
|
||||
_______, KC_F21, KC_F22, KC_F23,
|
||||
KC_F24, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, COLEMAK, QWERTY, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
}
|
||||
/* MOVE
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* | | | | | | | |Home | Up | End | | Esc |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |Left |Down |Right|Caps | Del |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | |PgDn |PgUp |TabL |TabR | |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_MOVE] = {
|
||||
{
|
||||
AC(KC_A), AC(KC_B), AC(KC_C), AC(KC_D),
|
||||
AC(KC_E), AC(KC_F), XXXXXXX, KC_HOME,
|
||||
KC_UP, KC_END, XXXXXXX, KC_ESC
|
||||
},
|
||||
{
|
||||
AC(KC_G), AC(KC_H), AC(KC_I), AC(KC_J),
|
||||
AC(KC_K), AC(KC_L), XXXXXXX, KC_LEFT,
|
||||
KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL
|
||||
},
|
||||
{
|
||||
_______, AC(KC_M), AC(KC_N), AC(KC_O),
|
||||
AC(KC_P), AC(KC_Q), XXXXXXX, KC_PGDN,
|
||||
KC_PGUP, SC(KC_TAB), C(KC_TAB), _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
},
|
||||
|
||||
/* FUNC
|
||||
* ,-----------------------------------------------------------------------.
|
||||
* |Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 |VolUp|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Power| F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 |VolDn|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | F21 | F22 | F23 | F24 | | | | |Clmak|Qwrty| |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | | | | |Prev |Mute |Play |Next | | | | |
|
||||
* `-----------------------------------------------------------------------'
|
||||
*/
|
||||
[_FUNC] = {
|
||||
{
|
||||
RESET, KC_F1, KC_F2, KC_F3,
|
||||
KC_F4, KC_F5, KC_F6, KC_F7,
|
||||
KC_F8, KC_F9, KC_F10, KC_VOLU
|
||||
},
|
||||
{
|
||||
KC_POWER, KC_F11, KC_F12, KC_F13,
|
||||
KC_F14, KC_F15, KC_F16, KC_F17,
|
||||
KC_F18, KC_F19, KC_F20, KC_VOLD
|
||||
},
|
||||
{
|
||||
_______, KC_F21, KC_F22, KC_F23,
|
||||
KC_F24, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, COLEMAK, QWERTY, _______
|
||||
},
|
||||
{
|
||||
_______, _______, _______, _______,
|
||||
KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT,
|
||||
_______, _______, _______, _______
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float colemak_song[][2] = SONG(COLEMAK_SOUND);
|
||||
float qwerty_song[][2] = SONG(QWERTY_SOUND);
|
||||
float colemak_song[][2] = SONG(COLEMAK_SOUND);
|
||||
float qwerty_song[][2] = SONG(QWERTY_SOUND);
|
||||
#endif
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(colemak_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(qwerty_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMB:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_SYMB);
|
||||
} else {
|
||||
layer_off(_SYMB);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOVE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOVE);
|
||||
} else {
|
||||
layer_off(_MOVE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
void set_colemak(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(colemak_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
|
||||
void set_qwerty(void) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
stop_all_notes();
|
||||
PLAY_SONG(qwerty_song);
|
||||
#endif
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_colemak();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_qwerty();
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case SYMB:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_SYMB);
|
||||
} else {
|
||||
layer_off(_SYMB);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MOVE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOVE);
|
||||
} else {
|
||||
layer_off(_MOVE);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case FUNC:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_FUNC);
|
||||
} else {
|
||||
layer_off(_FUNC);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
189
keyboards/rama/m10_b/config.h
Normal file
189
keyboards/rama/m10_b/config.h
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
Copyright 2018 Wilba
|
||||
|
||||
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 CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0x5241 // "RW"
|
||||
#define PRODUCT_ID 0x00AB // 10-B
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER RAMA.WORKS
|
||||
#define PRODUCT RAMA M10-B
|
||||
#define DESCRIPTION RAMA M10-B Macropad
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 1
|
||||
#define MATRIX_COLS 10
|
||||
|
||||
/*
|
||||
* Keyboard Matrix Assignments
|
||||
*
|
||||
* Change this to how you wired your keyboard
|
||||
* COLS: AVR pins used for columns, left to right
|
||||
* ROWS: AVR pins used for rows, top to bottom
|
||||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
|
||||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
|
||||
*
|
||||
*/
|
||||
#define MATRIX_ROW_PINS { E6 }
|
||||
#define MATRIX_COL_PINS { D7, B6, F0, D6, B5, F1, D4, B4, F4, F5 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
|
||||
#define BACKLIGHT_PIN C6
|
||||
//#define BACKLIGHT_BREATHING
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
|
||||
* This is userful for the Windows task manager shortcut (ctrl+shift+esc).
|
||||
*/
|
||||
// #define GRAVE_ESC_CTRL_OVERRIDE
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
/*
|
||||
* MIDI options
|
||||
*/
|
||||
|
||||
/* Prevent use of disabled MIDI features in the keymap */
|
||||
//#define MIDI_ENABLE_STRICT 1
|
||||
|
||||
/* enable basic MIDI features:
|
||||
- MIDI notes can be sent when in Music mode is on
|
||||
*/
|
||||
//#define MIDI_BASIC
|
||||
|
||||
/* enable advanced MIDI features:
|
||||
- MIDI notes can be added to the keymap
|
||||
- Octave shift and transpose
|
||||
- Virtual sustain, portamento, and modulation wheel
|
||||
- etc.
|
||||
*/
|
||||
//#define MIDI_ADVANCED
|
||||
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
#endif
|
23
keyboards/rama/m10_b/info.json
Normal file
23
keyboards/rama/m10_b/info.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"keyboard_name": "m10-b",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 3,
|
||||
"height": 4,
|
||||
"layouts": {
|
||||
"LAYOUT": {
|
||||
"layout": [
|
||||
{ "x": 0, "y": 0 },
|
||||
{ "x": 1, "y": 0 },
|
||||
{ "x": 2, "y": 0 },
|
||||
{ "x": 0, "y": 1 },
|
||||
{ "x": 1, "y": 1 },
|
||||
{ "x": 2, "y": 1 },
|
||||
{ "x": 0, "y": 2 },
|
||||
{ "x": 1, "y": 2 },
|
||||
{ "x": 2, "y": 2 },
|
||||
{ "x": 1, "y": 3, "w": 2.0 }
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
24
keyboards/rama/m10_b/keymaps/default/config.h
Normal file
24
keyboards/rama/m10_b/keymaps/default/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
26
keyboards/rama/m10_b/keymaps/default/keymap.c
Normal file
26
keyboards/rama/m10_b/keymaps/default/keymap.c
Normal file
@@ -0,0 +1,26 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_0 )
|
||||
|
||||
};
|
||||
|
||||
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;
|
||||
}
|
7
keyboards/rama/m10_b/keymaps/default/readme.md
Normal file
7
keyboards/rama/m10_b/keymaps/default/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||

|
||||
|
||||
# Default RAMA M10-B Layout
|
||||
|
||||
This is an example layout.
|
||||
|
||||
|
24
keyboards/rama/m10_b/keymaps/knops/config.h
Normal file
24
keyboards/rama/m10_b/keymaps/knops/config.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
64
keyboards/rama/m10_b/keymaps/knops/keymap.c
Normal file
64
keyboards/rama/m10_b/keymaps/knops/keymap.c
Normal file
@@ -0,0 +1,64 @@
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
/*KNOPS_MISC*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*KNOPS_LAYOUT*/
|
||||
|
||||
};
|
||||
|
||||
// M10-B LEDs are all in parallel and controlled by the QMK backlight
|
||||
// functionality. LED functions here are for possible future use
|
||||
// as layer indicators, etc. and not implemented yet.
|
||||
//
|
||||
// To implement LED functions here, QMK backlight functionality
|
||||
// will need to be disabled either via rules.mk or config.h
|
||||
// or overriding the backlight functions to do nothing.
|
||||
//
|
||||
// LEDs are driven by a transistor connected to pin C6.
|
||||
//
|
||||
|
||||
void set_led_state(int ledId, bool state)
|
||||
{
|
||||
}
|
||||
|
||||
void led_init_ports()
|
||||
{
|
||||
}
|
||||
|
||||
void led_set_layer(int layer)
|
||||
{
|
||||
led_init_ports();
|
||||
|
||||
led_set_layer(0);
|
||||
|
||||
/*KNOPS_SIMPLELED_STATES*/
|
||||
}
|
||||
|
||||
void matrix_init_user(void)
|
||||
{
|
||||
/*KNOPS_INIT*/
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
/*KNOPS_MACRO*/
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
/*KNOPS_SCAN*/
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led)
|
||||
{
|
||||
/*KNOPS_FUNCTIONALLED_STATES*/
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
/*KNOPS_PROCESS_STATE*/
|
||||
return NULL;
|
||||
}
|
7
keyboards/rama/m10_b/keymaps/knops/readme.md
Normal file
7
keyboards/rama/m10_b/keymaps/knops/readme.md
Normal file
@@ -0,0 +1,7 @@
|
||||

|
||||
|
||||
# Default RAMA M10-B Layout
|
||||
|
||||
This is an example layout.
|
||||
|
||||
|
44
keyboards/rama/m10_b/m10_b.c
Normal file
44
keyboards/rama/m10_b/m10_b.c
Normal file
@@ -0,0 +1,44 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 "m10_b.h"
|
||||
/*
|
||||
void matrix_init_kb(void) {
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
|
||||
matrix_init_user();
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void) {
|
||||
// put your looping keyboard code here
|
||||
// runs every cycle (a lot)
|
||||
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
|
||||
// put your per-action keyboard code here
|
||||
// runs for every action, just before processing by the firmware
|
||||
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led) {
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
*/
|
29
keyboards/rama/m10_b/m10_b.h
Normal file
29
keyboards/rama/m10_b/m10_b.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/* Copyright 2018 Wilba
|
||||
*
|
||||
* 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 "quantum.h"
|
||||
|
||||
#ifndef RAMA_M10_B_H
|
||||
#define RAMA_M10_B_H
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT( \
|
||||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09 ) \
|
||||
{ \
|
||||
{K00, K01, K02, K03, K04, K05, K06, K07, K08, K09}, \
|
||||
}
|
||||
#endif // RAMA_M10_B
|
15
keyboards/rama/m10_b/readme.md
Normal file
15
keyboards/rama/m10_b/readme.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# RAMA M10-B
|
||||
|
||||

|
||||
|
||||
Mechanical Mini Pad. [More info at Massdrop](https://www.massdrop.com/buy/rama-m10-a)
|
||||
|
||||
Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582)
|
||||
Hardware Supported: RAMA M10-B PCB
|
||||
Hardware Availability: [Massdrop](https://www.massdrop.com/buy/rama-m10-a)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make rama/m10_b: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.
|
68
keyboards/rama/m10_b/rules.mk
Normal file
68
keyboards/rama/m10_b/rules.mk
Normal file
@@ -0,0 +1,68 @@
|
||||
# MCU name
|
||||
#MCU = at90usb1286
|
||||
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
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= yes # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= yes # Commands for debug and configuration
|
||||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
NKRO_ENABLE ?= no # USB Nkey Rollover
|
||||
BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality on B7 by default
|
||||
MIDI_ENABLE ?= no # MIDI support (+2400 to 4200, depending on config)
|
||||
UNICODE_ENABLE ?= no # Unicode
|
||||
BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE ?= no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE ?= no # Use buzzer to emulate clicky switches
|
@@ -1,4 +1,4 @@
|
||||

|
||||

|
||||
|
||||
# Default RAMA M6-A Layout
|
||||
|
||||
|
@@ -119,8 +119,13 @@ void matrix_init(void)
|
||||
debug_matrix = true;
|
||||
debug_mouse = true;
|
||||
// initialize row and col
|
||||
#if (DIODE_DIRECTION == COL2ROW)
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
#elif (DIODE_DIRECTION == ROW2COL)
|
||||
unselect_cols();
|
||||
init_rows();
|
||||
#endif
|
||||
|
||||
TX_RX_LED_INIT;
|
||||
|
||||
|
@@ -11,7 +11,7 @@ Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make tada68:default:bin
|
||||
|
||||
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.
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
|
||||
|
||||
## Flashing Instructions
|
||||
|
||||
|
21
keyboards/uk78/info.json
Normal file
21
keyboards/uk78/info.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"keyboard_name": "UK78",
|
||||
"url": "",
|
||||
"maintainer": "qmk",
|
||||
"width": 19,
|
||||
"height": 5,
|
||||
"layouts": {
|
||||
"LAYOUT_all": {
|
||||
"key_count": 87,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K212", "x":12.75, "y":2}, {"label":"K214", "x":13.75, "y":2, "w":1.25}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3}, {"label":"K313", "x":13.25, "y":3, "w":0.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
},
|
||||
"LAYOUT_ansi": {
|
||||
"key_count": 83,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K214", "x":12.75, "y":2, "w":2.25}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":2.25}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K412", "x":11.5, "y":4, "w":1.5}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
},
|
||||
"LAYOUT_iso": {
|
||||
"key_count": 84,
|
||||
"layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K016", "x":16, "y":0}, {"label":"K017", "x":17, "y":0}, {"label":"K018", "x":18, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K101", "x":1.5, "y":1}, {"label":"K102", "x":2.5, "y":1}, {"label":"K103", "x":3.5, "y":1}, {"label":"K104", "x":4.5, "y":1}, {"label":"K105", "x":5.5, "y":1}, {"label":"K106", "x":6.5, "y":1}, {"label":"K107", "x":7.5, "y":1}, {"label":"K108", "x":8.5, "y":1}, {"label":"K109", "x":9.5, "y":1}, {"label":"K110", "x":10.5, "y":1}, {"label":"K111", "x":11.5, "y":1}, {"label":"K112", "x":12.5, "y":1}, {"label":"K114", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"K115", "x":15, "y":1}, {"label":"K116", "x":16, "y":1}, {"label":"K117", "x":17, "y":1}, {"label":"K118", "x":18, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K201", "x":1.75, "y":2}, {"label":"K202", "x":2.75, "y":2}, {"label":"K203", "x":3.75, "y":2}, {"label":"K204", "x":4.75, "y":2}, {"label":"K205", "x":5.75, "y":2}, {"label":"K206", "x":6.75, "y":2}, {"label":"K207", "x":7.75, "y":2}, {"label":"K208", "x":8.75, "y":2}, {"label":"K209", "x":9.75, "y":2}, {"label":"K210", "x":10.75, "y":2}, {"label":"K211", "x":11.75, "y":2}, {"label":"K212", "x":12.75, "y":2}, {"label":"K215", "x":15, "y":2}, {"label":"K216", "x":16, "y":2}, {"label":"K217", "x":17, "y":2}, {"label":"K218", "x":18, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K312", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K315", "x":15, "y":3}, {"label":"K316", "x":16, "y":3}, {"label":"K317", "x":17, "y":3}, {"label":"K318", "x":18, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K402", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K412", "x":11.5, "y":4, "w":1.5}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K416", "x":16, "y":4}, {"label":"K417", "x":17, "y":4}, {"label":"K418", "x":18, "y":4}]
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,4 @@
|
||||
#include "uk78.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
@@ -12,63 +9,68 @@
|
||||
#define _FL2 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt|Ctrl|Mo(1)|Lef|Dow| Rig| P0| P.|PEnt|
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7, KC_P8, KC_P9, KC_PEQL,
|
||||
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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_SLCK,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | |Hu+|Va+|Sa+| | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | BL_Toggle | | | | |Vol-| | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = KEYMAP(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, 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, RGB_HUI, RGB_SAI, RGB_VAI, 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, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_TRNS, KC_MUTE, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| /|BSpc| Del| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | P7| P8| P9| P=|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| #| Ent| P4| P5| P6| P+|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift| \| Z| X| C| V| B| N| M| ,| .| /|Shift | Up| P1| P2| P3|SLck|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt|Ctrl|Mo(1)|Lef|Dow| Rig| P0| P.|PEnt|
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_DEL, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7, KC_P8, KC_P9, KC_PEQL,
|
||||
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_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_NUBS, 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_P1, KC_P2, KC_P3, KC_SLCK,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(_FL1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | `|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins|NLck| | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | |Hu+|Va+|Sa+| | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+| |Mute|Vol+| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | BL_Toggle | | | | |Vol-| | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = LAYOUT_all(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_NLCK, _______, _______, _______,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, _______, KC_MUTE, KC_MUTE, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, BL_TOGG, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
|
||||
};
|
||||
@@ -81,43 +83,40 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
}
|
||||
else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3);
|
||||
PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3);
|
||||
PORTA &= ~(1 << 3);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,7 +1,4 @@
|
||||
#include "uk78.h"
|
||||
|
||||
// Helpful defines
|
||||
#define _______ KC_TRNS
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
@@ -12,64 +9,68 @@
|
||||
#define _FL2 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|Del |NLck| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bspc | P7| P8| P9| |
|
||||
* |--------------------------------------------------------------------------| P+|
|
||||
* | L1 | A| S| D| F| G| H| J| K| L| ;| '| Ent| P4| P5| P6| |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| L2 | Up| P1| P2| P3| |
|
||||
* |--------------------------------------------------------------------------|PEnt|
|
||||
* |Ctrl |Alt | Space |AltGr |Win |Lef|Dow| Rig| P0| P.| |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = KEYMAP(
|
||||
KC_GRV, 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_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
MO(_FL1),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FL2),MO(_FL2), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_LGUI, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |PgUp| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |Home|PgDn|End | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = KEYMAP(
|
||||
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_PSCR, KC_INS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | |Prv|Ply|Nxt| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Caps | | |uln|Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+|Stp| | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | |Menu | BL_Toggle | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = KEYMAP(
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_APP, KC_APP, BL_TOGG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
/* _BL: Base Layer(Default) - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |` | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \|Del |NLck| P/| P*| P-|
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bspc | P7| P8| P9| |
|
||||
* |--------------------------------------------------------------------------| P+|
|
||||
* | L1 | A| S| D| F| G| H| J| K| L| ;| '| Ent| P4| P5| P6| |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /| L2 | Up| P1| P2| P3| |
|
||||
* |--------------------------------------------------------------------------|PEnt|
|
||||
* |Ctrl |Alt | Space |AltGr |Win |Lef|Dow| Rig| P0| P.| |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_BL] = LAYOUT_all(
|
||||
KC_GRV, 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_DEL, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
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_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
MO(_FL1),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_BSLS, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
KC_LSFT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_FL2),MO(_FL2), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LALT, KC_SPC, KC_RALT, KC_LGUI, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
|
||||
),
|
||||
|
||||
/* _FL1: Function Layer 1 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* |Esc|F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|PScr|Ins| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |PgUp| | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | | |Home|PgDn|End | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL1] = LAYOUT_all(
|
||||
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_PSCR, KC_INS, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______
|
||||
),
|
||||
|
||||
/* _FL2: Function Layer 2 - For ISO enter use ANSI \
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | | |RST| | | | |Prv|Ply|Nxt| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* |Caps | | |uln|Hu+|Va+|Sa+| | |Vod|Vou|Mut| | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | | | |RGB|Hu-|Va-|Sa-|Bl-|Bl+|Stp| | | | | | | |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | |Menu | BL_Toggle | | | | | | | | |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_FL2] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, RESET, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, _______, _______, _______, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, RGB_TOG, RGB_HUD, RGB_SAD, RGB_VAD, BL_DEC, BL_INC, KC_MSTP, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_APP, KC_APP, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
@@ -81,39 +82,39 @@ void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
} else {
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
DDRA |= (1 << 3); PORTA |= (1 << 3);
|
||||
} else {
|
||||
DDRA &= ~(1 << 3); PORTA &= ~(1 << 3);
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} 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 {
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -4,13 +4,12 @@
|
||||
|
||||
A fully customizable 60%+numpad keyboard.
|
||||
|
||||
* Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin)
|
||||
* Hardware Supported: UK78 PCB
|
||||
* rev2
|
||||
* Hardware Availability: [ukkeyboards.](http://ukkeyboards.bigcartel.com/)
|
||||
Keyboard Maintainer: [Rozakiin](https://github.com/rozakiin)
|
||||
Hardware Supported: UK78 rev2 PCB
|
||||
Hardware Availability: [ukkeyboards](http://ukkeyboards.bigcartel.com/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make uk78: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.
|
||||
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.
|
||||
|
@@ -3,18 +3,108 @@
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \
|
||||
// readability
|
||||
#define ____ KC_NO
|
||||
|
||||
/* Re: Right Shift
|
||||
*
|
||||
* Per a conversation I had on reddit with Rozakiin, matrix positions K312,
|
||||
* K313 and K314 are never in use all together at the same time.
|
||||
*
|
||||
* A 2.75u-sized right Shift uses position K313, rendering K312 and K314
|
||||
* inaccessible.
|
||||
*
|
||||
* A split right Shift, in either 1.75u/1u or 1u/1.75u (JIS layout) uses
|
||||
* positions K312 and K314, rendering K313 inaccessible.
|
||||
*
|
||||
* - @noroadsleft
|
||||
* July 13, 2018
|
||||
*/
|
||||
|
||||
#define LAYOUT_all( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K214, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K411, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, K411, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
/* LAYOUT_ansi
|
||||
*
|
||||
* This layout uses:
|
||||
*
|
||||
* - Split Backspace (K013 and K014)
|
||||
* - ANSI Enter (K214)
|
||||
* - ANSI 2.25u Left Shift (K300)
|
||||
* - Compact right Shift (K312 and K314)
|
||||
* - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left
|
||||
* arrow key
|
||||
* ,---------------------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [{| ]}| \||P7 |P8 |P9 |P= |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Caps | A| S| D| F| G| H| J| K| L| ;:| '"| Enter|P4 |P5 |P6 |P+ |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,<| .>| /?| Shift| Up|P1 |P2 |P3 |SLk|
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Ctrl|GUI |Alt | | Alt| Fn|Lft|Dwn|Rgh|P0 |P. |Ent|
|
||||
* `---------------------------------------------------------------------------'
|
||||
*/
|
||||
#define LAYOUT_ansi( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K214, K215, K216, K217, K218, \
|
||||
K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, ____, ____, K214, K215, K216, K217, K218 }, \
|
||||
{ K300, ____, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
/* LAYOUT_iso
|
||||
*
|
||||
* This layout uses:
|
||||
*
|
||||
* - Split Backspace (K013 and K014)
|
||||
* - ISO Enter (K114)
|
||||
* - ISO Left Shift and 1u (K300 and K301)
|
||||
* - Compact right Shift (K312 and K314)
|
||||
* - Two 1.5u modifiers (K410 and K412) between the spacebar and the Left
|
||||
* arrow key
|
||||
* ,---------------------------------------------------------------------------.
|
||||
* |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -_| =+| \||Bsp|Del|P/ |P* |P- |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [{| ]}|Enter|P7 |P8 |P9 |P= |
|
||||
* |------------------------------------------------------. ----------------|
|
||||
* |Caps | A| S| D| F| G| H| J| K| L| ;:| '@| #~| |P4 |P5 |P6 |P+ |
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Sft | \|| Z| X| C| V| B| N| M| ,<| .>| /?| Shift| Up|P1 |P2 |P3 |SLk|
|
||||
* |---------------------------------------------------------------------------|
|
||||
* |Ctrl|GUI |Alt | | Alt| Fn|Lft|Dwn|Rgh|P0 |P. |Ent|
|
||||
* `---------------------------------------------------------------------------'
|
||||
*/
|
||||
#define LAYOUT_iso( \
|
||||
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, \
|
||||
K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, K116, K117, K118, \
|
||||
K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K215, K216, K217, K218, \
|
||||
K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, K315, K316, K317, K318, \
|
||||
K400, K401, K402, K406, K410, K412, K413, K414, K415, K416, K417, K418 \
|
||||
) { \
|
||||
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \
|
||||
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, ____, K114, K115, K116, K117, K118 }, \
|
||||
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, ____, ____, K215, K216, K217, K218 }, \
|
||||
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, ____, K314, K315, K316, K317, K318 }, \
|
||||
{ K400, K401, K402, ____, ____, ____, K406, ____, ____, ____, K410, ____, K412, K413, K414, K415, K416, K417, K418 } \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@@ -16,7 +16,9 @@
|
||||
#include "quantum.h"
|
||||
#include "action_tapping.h"
|
||||
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
uint8_t get_oneshot_mods(void);
|
||||
#endif
|
||||
|
||||
static uint16_t last_td;
|
||||
static int8_t highest_td = -1;
|
||||
@@ -146,7 +148,11 @@ bool process_tap_dance(uint16_t keycode, keyrecord_t *record) {
|
||||
action->state.keycode = keycode;
|
||||
action->state.count++;
|
||||
action->state.timer = timer_read();
|
||||
#ifndef NO_ACTION_ONESHOT
|
||||
action->state.oneshot_mods = get_oneshot_mods();
|
||||
#else
|
||||
action->state.oneshot_mods = 0;
|
||||
#endif
|
||||
action->state.weak_mods = get_mods();
|
||||
action->state.weak_mods |= get_weak_mods();
|
||||
process_tap_dance_action_on_each_tap (action);
|
||||
|
@@ -898,14 +898,29 @@ static const uint8_t backlight_pin = BACKLIGHT_PIN;
|
||||
|
||||
// depending on the pin, we use a different output compare unit
|
||||
#if BACKLIGHT_PIN == B7
|
||||
# define COM1x1 COM1C1
|
||||
# define OCR1x OCR1C
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1C1
|
||||
# define OCRxx OCR1C
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == B6
|
||||
# define COM1x1 COM1B1
|
||||
# define OCR1x OCR1B
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1B1
|
||||
# define OCRxx OCR1B
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == B5
|
||||
# define COM1x1 COM1A1
|
||||
# define OCR1x OCR1A
|
||||
# define TCCRxA TCCR1A
|
||||
# define TCCRxB TCCR1B
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR1A
|
||||
# define ICRx ICR1
|
||||
#elif BACKLIGHT_PIN == C6
|
||||
# define TCCRxA TCCR3A
|
||||
# define TCCRxB TCCR3B
|
||||
# define COMxx1 COM1A1
|
||||
# define OCRxx OCR3A
|
||||
# define ICRx ICR3
|
||||
#else
|
||||
# define NO_HARDWARE_PWM
|
||||
#endif
|
||||
@@ -987,7 +1002,7 @@ static uint16_t cie_lightness(uint16_t v) {
|
||||
|
||||
// range for val is [0..TIMER_TOP]. PWM pin is high while the timer count is below val.
|
||||
static inline void set_pwm(uint16_t val) {
|
||||
OCR1x = val;
|
||||
OCRxx = val;
|
||||
}
|
||||
|
||||
#ifndef BACKLIGHT_CUSTOM_DRIVER
|
||||
@@ -998,10 +1013,10 @@ void backlight_set(uint8_t level) {
|
||||
|
||||
if (level == 0) {
|
||||
// Turn off PWM control on backlight pin
|
||||
TCCR1A &= ~(_BV(COM1x1));
|
||||
TCCRxA &= ~(_BV(COMxx1));
|
||||
} else {
|
||||
// Turn on PWM control of backlight pin
|
||||
TCCR1A |= _BV(COM1x1);
|
||||
TCCRxA |= _BV(COMxx1);
|
||||
}
|
||||
// Set the brightness
|
||||
set_pwm(cie_lightness(TIMER_TOP * (uint32_t)level / BACKLIGHT_LEVELS));
|
||||
@@ -1149,11 +1164,10 @@ void backlight_init_ports(void)
|
||||
"In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]."
|
||||
"In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)."
|
||||
*/
|
||||
|
||||
TCCR1A = _BV(COM1x1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010;
|
||||
TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;
|
||||
// Use full 16-bit resolution. Counter counts to ICR1 before reset to 0.
|
||||
ICR1 = TIMER_TOP;
|
||||
ICRx = TIMER_TOP;
|
||||
|
||||
backlight_init();
|
||||
#ifdef BACKLIGHT_BREATHING
|
||||
@@ -1173,6 +1187,10 @@ void backlight_set(uint8_t level) {}
|
||||
|
||||
#endif // backlight
|
||||
|
||||
#ifdef HD44780_ENABLED
|
||||
#include "hd44780.h"
|
||||
#endif
|
||||
|
||||
|
||||
// Functions for spitting out values
|
||||
//
|
||||
|
@@ -121,6 +121,10 @@ extern uint32_t default_layer_state;
|
||||
#include "process_terminal_nop.h"
|
||||
#endif
|
||||
|
||||
#ifdef HD44780_ENABLE
|
||||
#include "hd44780.h"
|
||||
#endif
|
||||
|
||||
#define STRINGIZE(z) #z
|
||||
#define ADD_SLASH_X(y) STRINGIZE(\x ## y)
|
||||
#define SYMBOL_STR(x) ADD_SLASH_X(x)
|
||||
|
@@ -187,4 +187,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
|
||||
//#define MIDI_TONE_KEYCODE_OCTAVES 1
|
||||
|
||||
/*
|
||||
* HD44780 LCD Display Configuration
|
||||
*/
|
||||
/*
|
||||
#define LCD_LINES 2 //< number of visible lines of the display
|
||||
#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display
|
||||
|
||||
#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode
|
||||
|
||||
#if LCD_IO_MODE
|
||||
#define LCD_PORT PORTB //< port for the LCD lines
|
||||
#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0
|
||||
#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1
|
||||
#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2
|
||||
#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3
|
||||
#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0
|
||||
#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1
|
||||
#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2
|
||||
#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3
|
||||
#define LCD_RS_PORT LCD_PORT //< port for RS line
|
||||
#define LCD_RS_PIN 3 //< pin for RS line
|
||||
#define LCD_RW_PORT LCD_PORT //< port for RW line
|
||||
#define LCD_RW_PIN 2 //< pin for RW line
|
||||
#define LCD_E_PORT LCD_PORT //< port for Enable line
|
||||
#define LCD_E_PIN 1 //< pin for Enable line
|
||||
#endif
|
||||
*/
|
||||
|
||||
#endif
|
||||
|
@@ -66,3 +66,4 @@ UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
|
||||
HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)
|
||||
|
@@ -69,6 +69,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
#ifdef MIDI_ENABLE
|
||||
# include "process_midi.h"
|
||||
#endif
|
||||
#ifdef HD44780_ENABLE
|
||||
# include "hd44780.h"
|
||||
#endif
|
||||
|
||||
#ifdef MATRIX_HAS_GHOST
|
||||
extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
|
||||
|
Reference in New Issue
Block a user