How to build your very own keyboard firmware

User avatar
scottc

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.

User avatar
Bhuyakasha

27 Mar 2015, 20:06

Yes it says it's HaaTa right there on the tin. It might be a bit difficult since I can't find much tutorial-like stuff, but his own documentation seems pretty solid.

SkySorcerer

28 Mar 2015, 00:21

Still not working. The ANSI_KEYMAP errors are gone, though. Getting closer.

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),
};

SkySorcerer

28 Mar 2015, 04:35

Nevermind, success! I started from scratch and the thing compiles. I will proceed to run around the table 79 times.

User avatar
scottc

28 Mar 2015, 04:43

Appropriate response:

Image

SkySorcerer

28 Mar 2015, 04:53

Replace the glasses with headphones and... yeah, perfect, that's me. Throwing stuff at the wall and seeing what sticks.

User avatar
hasu

28 Mar 2015, 08:44

TMK also has Cortex-M support now, in fact it works on Infinity(Freescale Kinetis) and I could port PS2-USB converter to NXP LPC11U35. But I didn't try Teensy3.1 yet. TMK uses CMSIS and HAL layer of mbed.org to support the MCU, this means, you are on the shoulders of the giants. Theoretically you can use any MCU mbed.org supports freely like chips from NXP, Freescale, STMicro, Nordic, Renesas. Also you will be able to make use of mbed libraries, code samples and tools.

Meanwhile HaaTa's Kiibohd uses its own concise libraries and PJRC USB stack. You'll be able to grasp its outline and hack it yourself.

BilliumMoto

09 Apr 2015, 01:37

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.

User avatar
Mal-2

09 Apr 2015, 14:29

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.
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.

User avatar
HzFaq

09 Apr 2015, 14:30

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.

edit - I'm fairly sure it's in the TMK firmware FAQs on github now that I think about it.

User avatar
SirHobo

09 Apr 2015, 19:22

Quick question,
My keyboard's firmware has had no trouble compiling, but none of the keys register. I'm pretty sure this is because of my diodes being in reverse of Matt3o's, but I don't know if it's possible to fix from within the firmware.

:? but just to be sure could anyone check over my firmware:
https://github.com/SirHobo/Keyboard-Firmware

and in case you want it here's a picture of the wiring (sorry for potato quality):
http://puu.sh/h7wVV/ef5fe094f9.jpg

thanks for assistance in advance

BilliumMoto

10 Apr 2015, 15:44

HzFaq wrote: 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.

edit - I'm fairly sure it's in the TMK firmware FAQs on github now that I think about it.
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.
SirHobo wrote: My keyboard's firmware has had no trouble compiling, but none of the keys register. I'm pretty sure this is because of my diodes being in reverse of Matt3o's, but I don't know if it's possible to fix from within the firmware.
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.

User avatar
HzFaq

10 Apr 2015, 15:47

BilliumMoto wrote:
HzFaq wrote: 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.

edit - I'm fairly sure it's in the TMK firmware FAQs on github now that I think about it.
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.
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.
Last edited by HzFaq on 10 Apr 2015, 15:53, edited 1 time in total.

User avatar
SirHobo

10 Apr 2015, 15:48

Thanks, I ended up just resoldering all the diodes and it works now.

BilliumMoto

13 Apr 2015, 01:26

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.
Yup, I was wrong, got NKRO to work after doing magickey+N, thanks!

But I cannot figure out how to have it in NKRO by default, I've tried pressing magic key (I bound it to be LSHIFT only) and then space+n like the FAQ tells me to, but then nothing happens. I disconnect and plug back in and NKRO is not enabled.

User avatar
hasu

13 Apr 2015, 01:56

If you build with enabling BOOTMAGIC you have to turn NKRO switch on by pressing 'Space + n' while pluging in. BOOTMAGIC setting is stored in EEPROM and keeped over power cycles. I'll update FAQ later.
https://github.com/tmk/tmk_keyboard#boo ... dip-switch

TMK's NKRO mode has some limitations which not fixed yet, I don't recommend it as default mode unless you are a daily user of chording or steno software like Plover. If you need NKRO just for gaming occasionally youd better change mode by magic N command only when needed.
https://github.com/tmk/tmk_keyboard/issues/117

Findecanor

13 Apr 2015, 10:04

Mal-2 wrote: 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.
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.

Failw1zard

15 Apr 2015, 02:37

I can't figure out why my keyboard won't work. Things like the F5 key and the windows key work, but other things don't respond sometimes, and when they do, it produces the whole column, such was 1qaz.

config.h

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

matrix.c

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;
    }
}

keymap_common.h

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

keymap_poker.c

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),
};

It compiles, and I can't see what I did wrong. Please don't tell me it short circuits.

User avatar
Bhuyakasha

18 Apr 2015, 15:05

The keys are working now, but I want to use them as jingle buttons, so it would be very handy if I could let one key execute multiple scancodes for example [ALT]+[X], what is the easiest way to do this?

User avatar
Muirium
µ

18 Apr 2015, 19:29

Macros.

I know nothing about TMK, but these are the classic way to trigger a stream of events from one keypress. They're in there somewhere.

User avatar
Ray

18 Apr 2015, 21:36

for single key + modifiers you do not need macros on tmk. Just use a FnX and the appropriate function. read 2.1.2 here https://github.com/tmk/tmk_keyboard/blo ... /keymap.md

User avatar
Bhuyakasha

18 Apr 2015, 23:28

Looks like that's what I need Ray, but one thing I don't quite understand. It seems like all the action codes are specified outside the keymap and inside the fn_actions, but then how can I specify which keyswitch corresponds with the action code?

Or can they maybe simply be included inside the keymap function?

Nvm I got it I think:

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
};

User avatar
redesigndavid

19 Apr 2015, 06:03

First of all, thank you to the hardwork this community has put in to make making your own keyboards a breeze!

I'm having some difficulty. I have a keyboard soldered so it has 7 rows and 10 columns. when I enable matrix_print (from keyboard.c), the printed matrix looks good.

Code: Select all

r/c 0123456789ABCDEF
00: 0000000000000000
01: 0000000000000000
02: 0000000000000000
03: 0000000100000000
04: 0000000000000000
05: 0000000000000000
06: 0000000000000000
When all keys are activated, it looks like this:

Code: Select all

r/c 0123456789ABCDEF
00: 1111001111000000
01: 1111001111000000
02: 1111001111000000
03: 1111001111000000
04: 1111111111000000
05: 1111111111000000
06: 1111111111000000
I'm having trouble with my keymaps though. I think my columns and rows are transposed. One half of the keyboard shares rows as the other half, but has the column numbers in descending order. I'm trying to write my KEYMAP like this, but the keys that come out don't make sense.

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,   }, \
}
This is my keymap_poker.c

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)
};
I'm guessing the second part of KEYMAP() defintion should reflect how the keys are wired together. But I can't find any sense to the keys that come out. Like I've tried updating the KEYMAP so there are no numbers, but after compiling and programming, there are keys that trigger numbers. And no matter what I do, the triggered keys does not change.

:shock: I'm pretty sure it's compiling keymap_poker.c each time I run make.

User avatar
Bhuyakasha

19 Apr 2015, 13:16

A new problem arises:

I'm debugging the third column of the following matrix:

qwer
tyui
opas
dfgh

It spams euag over and over again.. I'm pretty sure there is something shorted, as the code worked before I resoldered some connections, but I can't figure out what..

When pressing E:
gggg

Pressing U:
eeee

Pressing A:
ueueueue

Pressing G:
uaeuaeuaeuae

Have any ideas?

EDIT: I fixed it by resoldering the column onto another pin and changing the corresponding code. epik nice dude
Last edited by Bhuyakasha on 19 Apr 2015, 14:03, edited 1 time in total.

hypkx
Chasing the Dream

19 Apr 2015, 13:54

Hi Failw1zard,
Why is the
*/
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)
*/

User avatar
Ray

19 Apr 2015, 13:58

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,   }, \
}
not sure if it changes anything, but give it a try without the last comma in that #define Keymap.
also try "make clean" just to be sure. (I don't know anything about make, but I would try it in this case)

User avatar
Ray

19 Apr 2015, 14:06

Bhuyakasha wrote: I'm pretty sure there is something shorted, as the code worked before I resoldered some connections, but I can't figure out what..
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.
Edit: did you wire your diodes in series instead of parallel?

User avatar
redesigndavid

19 Apr 2015, 15:49

@Ray, thanks I tried that. But it didn't change anything.

I tried something else too. I updated the map so it now looks like this:

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 }  \
}
I figured, it's more accurate that way. I'm still using the same keymap_poker.c I posted above. After the update to the KEYMAP, it seems to have shifted some keys. There is one key that triggers "dim light", and it used to be on the left side of the keyboard, and now it's on the right. The odd part is I don't have "dim light" in my key maps. I don't even know how to add it yet. bummer...

User avatar
redesigndavid

19 Apr 2015, 16:18

I don't see it anywhere in the thread. Does anyone know how to activate the debug messages so you could see them in the hid_listen command? I had to go into keyboard.c and replace debug_matrix with 1 just to get the matrix to print. There has to be a cleaner way to do it. (Yes, I'm new to this.)

Edit:
I found the answer to the question above. It's the "CONSOLE_ENABLE" from Makefile. And coincedentally, when I disabled all build options except one, the keys triggered from my keyboard, started to make sense. I have to leave for work now. Later tonight I 'll try to find out which build option exactly was causing the triggered key results to go haywire.

This is how my build options currently look like:

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
Yipeee! At least now, I could start working on the keymaps knowing it's working. Hope I can post photos of my ugly creation soon. :D

Failw1zard

20 Apr 2015, 02:16

hypkx wrote: Hi Failw1zard,
Why is the
*/
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)
*/


It wouldn't compile with the function layer, and it wasn't very important, so I commented it out for the mean while. Once I can get the keyboard running at all, I'll work on the function layer.

Post Reply

Return to “Workshop”