Posted: 27 Mar 2015, 17:11
That's HaaTa's firmware, as far as I know. Never tried it, but I'm sure it's excellent.
mechanical keyboard authority
http://www.deskthority.net/
Code: Select all
keymap_poker.c:5:9: warning: implicit declaration of function ‘KEYMAP_ANSI’ [-Wimplicit-function-declaration]
KEYMAP_ANSI(
^
keymap_poker.c:6:9: error: ‘GRV’ undeclared here (not in a function)
GRV,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
^
keymap_poker.c:6:33: error: ‘MINS’ undeclared here (not in a function)
GRV,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
^
keymap_poker.c:6:38: error: ‘EQL’ undeclared here (not in a function)
GRV,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
^
keymap_poker.c:6:42: error: ‘BSPC’ undeclared here (not in a function)
GRV,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
^
keymap_poker.c:7:9: error: ‘TAB’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:13: error: ‘Q’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:15: error: ‘W’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:17: error: ‘E’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:19: error: ‘R’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:21: error: ‘T’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:23: error: ‘Y’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:25: error: ‘U’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:27: error: ‘I’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:29: error: ‘O’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:31: error: ‘P’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:33: error: ‘LBRC’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:38: error: ‘RBRC’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:7:43: error: ‘BSLS’ undeclared here (not in a function)
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
^
keymap_poker.c:8:9: error: ‘FN0’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:13: error: ‘A’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:15: error: ‘S’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:17: error: ‘D’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:19: error: ‘F’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:21: error: ‘G’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:23: error: ‘H’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:25: error: ‘J’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:27: error: ‘K’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:29: error: ‘L’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:31: error: ‘SCLN’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:36: error: ‘QUOT’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:8:41: error: ‘ENT’ undeclared here (not in a function)
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
^
keymap_poker.c:9:9: error: ‘LSFT’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:14: error: ‘Z’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:16: error: ‘X’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:18: error: ‘C’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:20: error: ‘V’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:22: error: ‘B’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:24: error: ‘N’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:26: error: ‘M’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:28: error: ‘COMM’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:33: error: ‘DOT’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:37: error: ‘SLSH’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:9:42: error: ‘RSFT’ undeclared here (not in a function)
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
^
keymap_poker.c:10:9: error: ‘LCTL’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:14: error: ‘LALT’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:19: error: ‘LGUI’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:24: error: ‘SPC’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:28: error: ‘NO’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:31: error: ‘RGUI’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:36: error: ‘RALT’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:10:41: error: ‘RCTL’ undeclared here (not in a function)
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
^
keymap_poker.c:13:9: error: expected ‘}’ before ‘KEYMAP_ANSI’
KEYMAP_ANSI(
^
Code: Select all
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
KEYMAP_ANSI(
GRV,1,2,3,4,5,6,7,8,9,0,MINS,EQL,BSPC, \
TAB,Q,W,E,R,T,Y,U,I,O,P,LBRC,RBRC,BSLS, \
FN0,A,S,D,F,G,H,J,K,L,SCLN,QUOT,ENT, \
LSFT,Z,X,C,V,B,N,M,COMM,DOT,SLSH,RSFT, \
LCTL,LALT,LGUI,SPC,NO,RGUI,RALT,RCTL)
/* 1: FN 1 */
KEYMAP_ANSI(
ESC,F1,F2,F3,F4,F5,F6,F7,F8,F9,F10,F11,F12,TRNS, \
TRNS,TRNS,UP,TRNS,TRNS,TRNS,TRNS,INS,HOME,PGUP,TRNS,TRNS,TRNS,TRNS, \
TRNS,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS,DEL,END,PGDN,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS)
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1),
};
That's a limitation of the USB protocol. All USB keyboards are subject to this limit unless they take the hacky method and pretend to be multiple keyboards -- which then causes problems with KVMs and non-PC machines.BilliumMoto wrote: I built firmware for a keyboard using this tutorial, and it's worked very well except for one thing:
I cannot register more than 6 simultaneous key presses, and for my purposes, I need to register 10 key presses at once at the very least. Is this a hardware limitation of the Teensy, or can this be adjusted by modifying the firmware?
I'm using a Teensy 2.0, keyboard has 2 rows and 5 column, diodes are on every key.
I think by default in TMK you can turn on NKRO by pressing and holding both shifts and pressing N. There is a way to have it activated by default but I can't remember how off the top of my head.BilliumMoto wrote: I built firmware for a keyboard using this tutorial, and it's worked very well except for one thing:
I cannot register more than 6 simultaneous key presses, and for my purposes, I need to register 10 key presses at once at the very least. Is this a hardware limitation of the Teensy, or can this be adjusted by modifying the firmware?
I'm using a Teensy 2.0, keyboard has 2 rows and 5 column, diodes are on every key.
Found it on the FAQ you mentioned. One problem though, I thought NKRO was not supported by LUFA, which is used by the Teensy. Please tell me I'm wrong.
Yea those diodes seem to be pointed the wrong direction to me. Not sure if this would work, but you could try transposing your matrix, i.e. programming your rows as columns and your columns as rows.
I'm pretty sure you're wrong, I've used the LUFA stack for about 18 months and I'm like 95% sure I've had NKRO working in that time. I can double check when I get home, I don't have aqua/switch hitter at the office.
Yup, I was wrong, got NKRO to work after doing magickey+N, thanks!HzFaq wrote: ]I'm pretty sure you're wrong, I've used the LUFA stack for about 18 months and I'm like 95% sure I've had NKRO working in that time. I can double check when I get home, I don't have aqua/switch hitter at the office.
edit - confirmed, tested it using aqua on my Phantom.
That is a common misconception. A keyboard can do N-key rollover over USB and follow the USB Human Interface Device specification to the letter. The problem is that not all other devices and software on the hosts follow the spec properly. Read more in the Wiki.
Code: Select all
#ifndef CONFIG_H
#define CONFIG_H
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER geekhack
#define PRODUCT GH60
#define DESCRIPTION t.m.k. keyboard firmware for GH60
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 15
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* key combination for command */
#define IS_COMMAND() ( \
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/*
* 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
#endif
Code: Select all
/*
Copyright 2012 Jun Wako <wakojun@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/>.
*/
/*
* scan matrix
*/
#include <stdint.h>
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
#include "print.h"
#include "debug.h"
#include "util.h"
#include "matrix.h"
#ifndef DEBOUNCE
# define DEBOUNCE 5
#endif
static uint8_t debouncing = DEBOUNCE;
/* matrix state(1:on, 0:off) */
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
static matrix_row_t read_cols(void);
static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
inline
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
}
inline
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
}
void matrix_init(void)
{
// initialize row and col
unselect_rows();
init_cols();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
}
uint8_t matrix_scan(void)
{
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
select_row(i);
_delay_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols();
if (matrix_debouncing[i] != cols) {
matrix_debouncing[i] = cols;
if (debouncing) {
debug("bounce!: "); debug_hex(debouncing); debug("\n");
}
debouncing = DEBOUNCE;
}
unselect_rows();
}
if (debouncing) {
if (--debouncing) {
_delay_ms(1);
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
matrix[i] = matrix_debouncing[i];
}
}
}
return 1;
}
bool matrix_is_modified(void)
{
if (debouncing) return false;
return true;
}
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 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
phex(row); print(": ");
pbin_reverse16(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 += bitpop16(matrix[i]);
}
return count;
}
/* Column pin configuration
* col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14
* pin: F0 F1 F4 F5 F6 F7 B6 B5 B4 D7 D2 D4 D5 C7 C6
*/
static void init_cols(void)
{
// Input with pull-up(DDR:0, PORT:1)
DDRF &= ~(1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
PORTF |= (1<<7 | 1<<6 | 1<<5 | 1<<4 | 1<<1 | 1<<0);
DDRD &= ~(1<<7 | 1<<5 | 1<<4 | 1<<2);
PORTD |= (1<<7 | 1<<5 | 1<<4 | 1<<2);
DDRC &= ~(1<<7 | 1<<6);
PORTC |= (1<<7 | 1<<6);
DDRB &= ~(1<<6 | 1<< 5 | 1<<4);
PORTB |= (1<<6 | 1<< 5 | 1<<4);
}
static matrix_row_t read_cols(void)
{
return (PINF&(1<<0) ? 0 : (1<<0)) |
(PINF&(1<<1) ? 0 : (1<<1)) |
(PINF&(1<<4) ? 0 : (1<<2)) |
(PINF&(1<<5) ? 0 : (1<<3)) |
(PINF&(1<<6) ? 0 : (1<<4)) |
(PINF&(1<<7) ? 0 : (1<<5)) |
(PINB&(1<<6) ? 0 : (1<<6)) |
(PINB&(1<<5) ? 0 : (1<<7)) |
(PINB&(1<<4) ? 0 : (1<<8)) |
(PIND&(1<<7) ? 0 : (1<<9)) |
(PIND&(1<<2) ? 0 : (1<<10)) |
(PIND&(1<<4) ? 0 : (1<<11)) |
(PIND&(1<<5) ? 0 : (1<<12)) |
(PINC&(1<<7) ? 0 : (1<<13)) |
(PINC&(1<<6) ? 0 : (1<<14)) ;
}
/* Row pin configuration
* row: 0 1 2 3 4 5
* pin: B0 B1 B2 B3 B7 D0
*/
static void unselect_rows(void)
{
// Hi-Z(DDR:0, PORT:0) to unselect
DDRB &= ~0b11110001;
PORTB &= ~0b11110001;
DDRD &= ~0b10000000;
PORTD &= ~0b10000000;
}
static void select_row(uint8_t row)
{
// Output low(DDR:1, PORT:0) to select
switch (row) {
case 0:
DDRB |= (1<<0);
PORTB &= ~(1<<0);
break;
case 1:
DDRB |= (1<<1);
PORTB &= ~(1<<1);
break;
case 2:
DDRB |= (1<<2);
PORTB &= ~(1<<2);
break;
case 3:
DDRB |= (1<<3);
PORTB &= ~(1<<3);
break;
case 4:
DDRB |= (1<<7);
PORTB &= ~(1<<7);
break;
case 5:
DDRD |= (1<<0);
PORTD &= ~(1<<0);
break;
}
}
Code: Select all
#ifndef KEYMAP_COMMON_H
#define KEYMAP_COMMON_H
#include <stdint.h>
#include <stdbool.h>
#include <avr/pgmspace.h>
#include "keycode.h"
#include "action.h"
#include "action_macro.h"
#include "report.h"
#include "host.h"
#include "print.h"
#include "debug.h"
#include "keymap.h"
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];
/* GH60 keymap definition macro
* K2C, K31 and K3C are extra keys for ISO
*/
#define KEYMAP( \
K00, K01, K03, K04, K05, K06, K07, K08, K09, K0B, K0C, K0D, K0E, \
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \
K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4B, K4C, \
K50, K51, K52, K55, K58, K5B, K5C, K5D \
) { \
{ KC_##K00, KC_##K01, KC_NO, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_NO, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E }, \
{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E }, \
{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_NO, KC_NO }, \
{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49, KC_NO, KC_##K4B, KC_##K4C, KC_NO, KC_NO }, \
{ KC_##K50, KC_##K51, KC_##K52, KC_NO, KC_NO, KC_##K55, KC_NO, KC_NO, KC_##K58, KC_NO, KC_NO, KC_##K5B, KC_##K5C, KC_##K5D, KC_NO } \
}
#endif
Code: Select all
#include "keymap_common.h"
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* 0: qwerty */
KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, \
GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, PSCR, \
TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, BSPC, \
CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, \
LCTRL, LGUI, LALT, SPC, RALT, RGUI, FN1, RCTRL),
/* 1: FN 1
KEYMAP(TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS)
*/
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1),
};
Code: Select all
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(FN0, FN1, FN2, FN3, \
FN4, FN5, FN6, FN7, \
FN8, FN9, FN10, FN11, \
FN12, FN13, FN14, FN15 ),
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_MODS_KEY(MOD_LALT, KC_A), // FN0 -> Alt + A
[1] = ACTION_MODS_KEY(MOD_LALT, KC_B), // FN1 -> Alt + B
[2] = ACTION_MODS_KEY(MOD_LALT, KC_C), // FN2 -> Alt + C
[3] = ACTION_MODS_KEY(MOD_LALT, KC_D), // FN3 -> Alt + D
[4] = ACTION_MODS_KEY(MOD_LALT, KC_E), // FN4 -> Alt + E
[5] = ACTION_MODS_KEY(MOD_LALT, KC_F), // FN5 -> Alt + F
[6] = ACTION_MODS_KEY(MOD_LALT, KC_G), // FN6 -> Alt + G
[7] = ACTION_MODS_KEY(MOD_LALT, KC_H), // FN7 -> Alt + H
[8] = ACTION_MODS_KEY(MOD_LALT, KC_I), // FN8 -> Alt + I
[9] = ACTION_MODS_KEY(MOD_LALT, KC_J), // FN9 -> Alt + J
[10] = ACTION_MODS_KEY(MOD_LALT, KC_K), // FN10 -> Alt + K
[11] = ACTION_MODS_KEY(MOD_LALT, KC_L), // FN11 -> Alt + L
[12] = ACTION_MODS_KEY(MOD_LALT, KC_M), // FN12 -> Alt + M
[13] = ACTION_MODS_KEY(MOD_LALT, KC_N), // FN13 -> Alt + N
[14] = ACTION_MODS_KEY(MOD_LALT, KC_O), // FN14 -> Alt + O
[15] = ACTION_MODS_KEY(MOD_LALT, KC_P), // FN15 -> Alt + P
};
Code: Select all
r/c 0123456789ABCDEF
00: 0000000000000000
01: 0000000000000000
02: 0000000000000000
03: 0000000100000000
04: 0000000000000000
05: 0000000000000000
06: 0000000000000000
Code: Select all
r/c 0123456789ABCDEF
00: 1111001111000000
01: 1111001111000000
02: 1111001111000000
03: 1111001111000000
04: 1111111111000000
05: 1111111111000000
06: 1111111111000000
Code: Select all
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, \
K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \
K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \
K56, K57, K58, K59, K60, K61 \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06 }, \
{ KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K20 }, \
{ KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34 }, \
{ KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48 }, \
{ KC_##K56, KC_##K57, KC_##K58, KC_NO, KC_NO, KC_NO, KC_NO, }, \
{ KC_##K07, KC_##K08, KC_##K09, KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \
{ KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
{ KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K40, KC_##K41 }, \
{ KC_##K49, KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55 }, \
{ KC_##K59, KC_##K60, KC_##K61, KC_NO, KC_NO, KC_NO, KC_NO, }, \
}
Code: Select all
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(
ESC, GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL,
PAUS, TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC,
FN1, LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT,
FN0, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, FN1,
LGUI, LALT, SPC, SPC, RALT, RGUI),
KEYMAP(
MUTE, MUTE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
TRNS, TRNS, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS),
KEYMAP(
MUTE, MUTE, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
VOLU, VOLD, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,TRNS, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS)
};
const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1),
[1] = ACTION_LAYER_TAP_KEY(1, KC_ESC),
[2] = ACTION_LAYER_TOGGLE(2)
};
not after*/
?/* 1: FN 1
/* 1: FN 1
KEYMAP(TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS)
*/
not sure if it changes anything, but give it a try without the last comma in that #define Keymap.redesigndavid wrote:Code: Select all
#define KEYMAP( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \ K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, \ K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \ K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ K56, K57, K58, K59, K60, K61 \ ) { \ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06 }, \ { KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K20 }, \ { KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34 }, \ { KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48 }, \ { KC_##K56, KC_##K57, KC_##K58, KC_NO, KC_NO, KC_NO, KC_NO, }, \ { KC_##K07, KC_##K08, KC_##K09, KC_##K10, KC_##K11, KC_##K12, KC_##K13 }, \ { KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ { KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K40, KC_##K41 }, \ { KC_##K49, KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55 }, \ { KC_##K59, KC_##K60, KC_##K61, KC_NO, KC_NO, KC_NO, KC_NO, }, \ }
probably a short. Figuring it out by looking is easier than thinking. Also check diode polarities in this case, could be some kind of ghosting as well.
Code: Select all
#define KEYMAP( \
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, \
K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, \
K28, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \
K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \
K56, K57, K58, K59, K60, K61 \
) { \
{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06 }, \
{ KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K20 }, \
{ KC_##K28, KC_##K29, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34 }, \
{ KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48 }, \
{ KC_##K56, KC_##K57, KC_##K58, KC_NO, KC_NO, KC_NO, KC_NO, }, \
{ KC_##K59, KC_##K60, KC_##K61, KC_NO, KC_NO, KC_NO, KC_NO, }, \
{ KC_##K49, KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55 }, \
{ KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K40, KC_##K41 }, \
{ KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
{ KC_##K07, KC_##K08, KC_##K09, KC_##K10, KC_##K11, KC_##K12, KC_##K13 } \
}
Code: Select all
# Build Options
# comment out to disable the options.
#
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
#MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
#EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
#COMMAND_ENABLE = yes # Commands for debug and configuration
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
hypkx wrote: Hi Failw1zard,
Why is thenot after*/?/* 1: FN 1/* 1: FN 1
KEYMAP(TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, LEFT, DOWN, RGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS)
*/