Author Topic: TMK keyboard firmware  (Read 259620 times)

0 Members and 1 Guest are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1800 on: Tue, 17 January 2017, 20:22:19 »
hi, i hava a question,  for
example if i want to click the space key, its just space, but i hold it
down,  its shift key.   how can i change the C file?
thanks

You can use ACTION_MODS_TAP_KEY(MOD_RSFT, KC_SPC) for this purpose.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md#213-modifier-with-tap-keydual-role

Also you can use keymap editor.
https://goo.gl/HFr1qR
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline nemo_gh

  • Posts: 12
Re: TMK keyboard firmware
« Reply #1801 on: Tue, 17 January 2017, 21:02:22 »
hi, i hava a question,  for
example if i want to click the space key, its just space, but i hold it
down,  its shift key.   how can i change the C file?
thanks

You can use ACTION_MODS_TAP_KEY(MOD_RSFT, KC_SPC) for this purpose.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md#213-modifier-with-tap-keydual-role

Also you can use keymap editor.
https://goo.gl/HFr1qR

hi, i hava a question,  for
example if i want to click the space key, its just space, but i hold it
down,  its shift key.   how can i change the C file?
thanks

You can use ACTION_MODS_TAP_KEY(MOD_RSFT, KC_SPC) for this purpose.
https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md#213-modifier-with-tap-keydual-role

Also you can use keymap editor.
https://goo.gl/HFr1qR


thanks   :D

Offline adam.baranyai

  • Posts: 2
Re: TMK keyboard firmware
« Reply #1802 on: Tue, 17 January 2017, 22:29:21 »
Hey All,

Quite newbie for GH and about a week old with Hasu controller in my HHKB. I've successfully setup the layout I wanted but for some mysterious reason, I can't seem to make oneshot modifier to work with my shift keys.

This is my current setup: https://goo.gl/uIwAtq

I've successfully uploaded it to the keyboard few times already but the feature doesn't work and I'm not sure what am I missing.

After successful firmware upgrade, I've tried to press shift (after releasing shift) then immediately pressing an 'A' character and the result is a small capital 'a' although CAPS LOCK isn't on.

Anyone using oneshot modifier for shift keys on HHKB with Hasu's controller successfully?

Offline ikno

  • Posts: 4
Re: TMK keyboard firmware
« Reply #1803 on: Wed, 18 January 2017, 02:43:37 »
hi, i hava a question,  for
example if i want to click the space key, its just space, but i hold it
down,  its shift key.   how can i change the C file?
thanks

Have a look at https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/doc/keymap.md#213-modifier-with-tap-keydual-role

Offline Hypersphere

  • Posts: 1855
  • Location: USA
Re: TMK keyboard firmware
« Reply #1804 on: Sat, 21 January 2017, 10:46:40 »
I have an Alps64 and I wanted to build the firmware from the ground up without the web configurator. I know how to flash the hex and have already created a keymap in a notepad file but even after reading through the github wiki and toying with a few of the programs I just cannot figure out how to compile the firmware. Can someone point me in the right direction with Windows 10 64bit? What do I need to install?
Windows 10 with the Anniversary Edition upgrade now includes the bash shell and a linux subsystem. There is also the option to install CygWin. Nevertheless, I  prefer to use an actual linux machine or to run linux in a VM using VMware Workstation or VirtualBox. I use Linux Mint 17.3 64-bit with the Xfce desktop on both my dedicated linux workstations and in my VMs.

However, if you don't want to build the firmware, the online configurator makes it very easy to generate your hex file. You can then flash the chip in the Alps64 using Atmel FLIP. I have a laptop running Windows 8.1 that I used for this. I encountered problems getting FLIP to run in Windows 10.



Offline yoobe

  • Posts: 48
  • Location: Rolle, Switzerland
  • Yoobe
Re: TMK keyboard firmware
« Reply #1805 on: Sat, 21 January 2017, 11:49:00 »
I am using RedScarft II+ with TMK firmware.
I am writing here but I am not use if the issue is in the Firmare..


When I use the keyboard on my laptop plugged on the usb port, I have no issue.
When I use it with a DELL docking station, I have a windows USB error : Device unrecognized.


Do you know what could be the issue? Power Consumption? Bootloader? Firmware?


Thanks

if its any of the new kind of docking stations i think thats were the problem lies at my last job everyone were trying all kind of things, updating firmware etc to no avail, people just simply stopped using them. What OS are you using? Logs etc give us da info


We are using windows 7 at work.
When I use my neutrino with a teensy 2.0 + QMK with the same config, I dont have any issue, I only have the issue with the RedScarfII+ VerC.
Yoobe

ErgoDox - Mx Brown
Filco Minila Air - Mx Red
RedScarfII+ VerC - Gateron White

Offline Cortes

  • Posts: 5
Re: TMK keyboard firmware
« Reply #1806 on: Sat, 21 January 2017, 21:32:36 »
Hi people!, I came here asking for some help, because I'm totally lost with my personalized keyboard based on teensy 2.0.

First of all, I do not speak English, and I'm translating all this into Uncle google


The question is that this is my second keyboard based on Teensy 2.0, and the functional part of keyboard works correctly, but the question is that this second keyboard sends it backlight and I'm very lost with it.


My idea is to have 2 independent leds, backlight and leds case, and I would use pins B6 and B7

I have these parts of code backlight.c that gave me the user breh:

Code: [Select]
    /*
    Copyright 2013 Mathias Andersson <wraul@dbox.se>

    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 "backlight.h"
    #include "eeconfig.h"
    #include "debug.h"

    backlight_config_t backlight_config;

    void backlight_init(void)
    {
        //check signature
        if (!eeconfig_is_enabled()) {
            eeconfig_init();
        }
        backlight_config.raw = eeconfig_read_backlight();
        backlight_set(backlight_config.enable ? backlight_config.level : 0);
    }

    void backlight_increase(void)
    {
        if(backlight_config.level < BACKLIGHT_LEVELS)
        {
            backlight_config.level++;
            backlight_config.enable = 1;
            eeconfig_write_backlight(backlight_config.raw);
        }
        dprintf("backlight increase: %u\n", backlight_config.level);
        backlight_set(backlight_config.level);
    }

    void backlight_decrease(void)
    {
        if(backlight_config.level > 0)
        {
            backlight_config.level--;
            backlight_config.enable = !!backlight_config.level;
            eeconfig_write_backlight(backlight_config.raw);
        }
        dprintf("backlight decrease: %u\n", backlight_config.level);
        backlight_set(backlight_config.level);
    }

    void backlight_toggle(void)
    {
        backlight_config.enable ^= 1;
        eeconfig_write_backlight(backlight_config.raw);
        dprintf("backlight toggle: %u\n", backlight_config.enable);
        backlight_set(backlight_config.enable ? backlight_config.level : 0);
    }

    void backlight_step(void)
    {
        backlight_config.level++;
        if(backlight_config.level > BACKLIGHT_LEVELS)
        {
            backlight_config.level = 0;
        }
        backlight_config.enable = !!backlight_config.level;
        eeconfig_write_backlight(backlight_config.raw);
        dprintf("backlight step: %u\n", backlight_config.level);
        backlight_set(backlight_config.level);
    }

    void backlight_level(uint8_t level)
    {
        backlight_config.level ^= level;
        backlight_config.enable = !!backlight_config.level;
        eeconfig_write_backlight(backlight_config.raw);
        backlight_set(backlight_config.level);
    }

    // Plank Code for Backlight

    //#include <avr/io.h>
    //#include "backlight.h"

    #define CHANNEL OCR1B
    // Plank is OCR1C
    void backlight_init_ports()
    {

        // Setup PB7 as output and output low.
        DDRB |= (1<<6);
        PORTB &= ~(1<<6);
       
        // Use full 16-bit resolution.
        ICR1 = 0xFFFF;

        // I could write a wall of text here to explain... but TL;DW
        // Go read the ATmega32u4 datasheet.
        // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on
       
        // Pin PB7 = OCR1C (Timer 1, Channel C)
       // Pin PB6 = OCR1B (Timer 1, Channel B)
        // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0
       // Compare Output Mode = Clear on compare match, Channel C = COM1B1=1 COM1B0=0
        // (i.e. start high, go low when counter matches.)
        // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0
        // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1
       
        TCCR1A = _BV(COM1B1) | _BV(WGM11); // = 0b00001010;
        TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001;

        backlight_init();
    }

    void backlight_set(uint8_t level)
    {
        if ( level == 0 )
        {
            // Turn off PWM control on PB6, revert to output low.
            TCCR1A &= ~(_BV(COM1B1));
            CHANNEL = 0x0;
            // Prevent backlight blink on lowest level
            PORTB &= ~(_BV(PORTB6));
        }
        else if ( level == BACKLIGHT_LEVELS )
        {
            // Prevent backlight blink on lowest level
            PORTB &= ~(_BV(PORTB6));
            // Turn on PWM control of PB6
            TCCR1A |= _BV(COM1B1);
            // Set the brightness
            CHANNEL = 0xFFFF;
        }
        else       
        {
            // Prevent backlight blink on lowest level
            PORTB &= ~(_BV(PORTB6));
            // Turn on PWM control of PB6
            TCCR1A |= _BV(COM1B1);
            // Set the brightness
            CHANNEL = 0xFFFF >> ((BACKLIGHT_LEVELS - level) * ((BACKLIGHT_LEVELS + 1) / 2));
        }
    }

I want to do something like breh does on your numeric keypad, have specific keys (the ones above the arrows) for the regular backlight, power on / off / more brightness / less brightness, and in another layer to control the LEDs of the case.

Here also the complete keyboard configuration:

http://Https://dl.dropboxusercontent.com/u/5052546/Shiro.rar


Two pics :D



Offline DreymaR

  • Posts: 290
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: TMK keyboard firmware
« Reply #1807 on: Mon, 23 January 2017, 02:58:24 »
Any news on using the new Teensy 3.6 with TMK? It's such a beast from the looks of it, with lots and lots of juicy memory for macros. And it has an on-board USB host!  :cool:
« Last Edit: Mon, 23 January 2017, 06:18:38 by DreymaR »
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline philipVick

  • Posts: 13
Re: TMK keyboard firmware
« Reply #1808 on: Tue, 31 January 2017, 14:02:54 »
Guys,  I definitely need some help.

I decided to build a custom keyboard, but I am not able to generate the hex file to flash into the teensy 2.0.

When I execute 'make gelo' from the shell, I have the following error message:

.Making gelo with keymap default

avr-gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: keyboards/gelo/gelo.c                                                                   /usr/local/Cellar/avr-gcc/4.9.3/avr/include/util/delay.h: In function '_delay_ms':
<command-line>:0:7: error: 'UL' undeclared (first use in this function)
<command-line>:0:7: note: each undeclared identifier is reported only once for each function it appears in
/usr/local/Cellar/avr-gcc/4.9.3/avr/include/util/delay.h: In function '_delay_us':
<command-line>:0:7: error: 'UL' undeclared (first use in this function)
 [ERRORS]
 |
 |
 |
make[1]: *** [.build/obj_gelo_default/keyboards/gelo/gelo.o] Error 1
make: *** [gelo] Error 1

Here the Makefile
"
QUANTUM_DIR=../../quantum

ifndef MAKEFILE_INCLUDED
   include ../../Makefile
endif

"
rule.mk :

ARCH = BOARD_TEENSY2
MCU = atmega32u4
F_USB = $(F_CPU)

gelo .c
#include "gelo.h"

void matrix_init_kb(void) {

   matrix_init_user();
}
 
gelo .h
#ifndef GELO_H
#define GELO_H

#include "quantum.h"

#define KEYMAP( \
   k00, k01, k02, k03, k04, k05, k06,     k07,    k08,    k09,    k0a, k0b, k0c, k0d,  \
   k10, k11, k12, k13, k14, k15,               k16,    k17,    k18, k19, k1a, k1b,  \
   k20, k21, k22, k23, k24, k25, k26,   k27,    k28,    k29,    k2a, k2b, k2c, k2d,  \
   k30, k31, k32, k33,   k34,    k35,   k36,        k37,       k38, k39, k3a, k3b  \
) \
{ \
   { k00, k01, k02, k03, k04, k05,   k06,     k07,    k08,    k09,    k0a, k0b, k0c, k0d }, \
   { k10, k11, k12, k13, k14, k15,   KC_NO, KC_NO,  k16,   k17,    k18, k19, k1a, k1b }, \
   { k20, k21, k22, k23, k24, k25,   k26,   k27,    k28,    k29,    k2a, k2b, k2c, k2d }, \
   { k30, k31, k32, k33, k34, KC_NO, k35,   k36,    k37,    KC_NO,    k38, k39, k3a, k3b }  \
}
#endif

I have no idea how to define this UL variable.

Offline Tactile

  • Posts: 714
  • Location: Portland, OR
Re: TMK keyboard firmware
« Reply #1809 on: Tue, 31 January 2017, 14:06:21 »
Guys,  I definitely need some help.

I decided to build a custom keyboard, but I am not able to generate the hex file to flash into the teensy 2.0.

When I execute 'make gelo' from the shell, I have the following error message:

.Making gelo with keymap default

avr-gcc (GCC) 4.9.3
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiling: keyboards/gelo/gelo.c                                                                   /usr/local/Cellar/avr-gcc/4.9.3/avr/include/util/delay.h: In function '_delay_ms':
<command-line>:0:7: error: 'UL' undeclared (first use in this function)

...

I have no idea how to define this UL variable.

Have you installed avr-libc?
« Last Edit: Tue, 31 January 2017, 14:08:49 by Tactile »

Offline philipVick

  • Posts: 13
Re: TMK keyboard firmware
« Reply #1810 on: Tue, 31 January 2017, 15:40:13 »
yes, I did.

Offline kentt

  • Posts: 5
Re: TMK keyboard firmware
« Reply #1811 on: Mon, 06 February 2017, 21:50:23 »
hasu,

I bought your controller from 1upkeyboards.  I'm assuming it will not work with the new hhkb bluetooth version that came out.  Is that correct?

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1812 on: Mon, 06 February 2017, 22:17:32 »
hasu,

I bought your controller from 1upkeyboards.  I'm assuming it will not work with the new hhkb bluetooth version that came out.  Is that correct?

Hi,
That is correct. If you have any other question specific to HHKB Alt controller this thread is proper.
https://geekhack.org/index.php?topic=71517.0

Thanks
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline rsadek

  • Posts: 230
  • Location: Columbia, Maryland
  • raging keyboard monkey
HHKB-JP settings on OSX
« Reply #1813 on: Sun, 12 February 2017, 14:05:53 »
I'm working to set up an HHKB-JP w/ Hasu's controller and am confused by the OS settings. It lets me set the input source to US or JP, and under JP there are several options. The board appears to do nothing unless I set these properly. But what do these different settings mean, and how do they relate to how I configure my keymap? For example, if I want to use Hasu's keymap, what is the best OS setting to use?


-R
❤️Keeboardz
---------------

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1814 on: Sun, 12 February 2017, 17:06:50 »
Just use US layout, it is one and real masta race! heh
In fact I use US layout for my keyboards, not JP one.

You may need to select JP layout only if you want to use JIS specific keys in Japanese input method.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline rsadek

  • Posts: 230
  • Location: Columbia, Maryland
  • raging keyboard monkey
Re: TMK keyboard firmware
« Reply #1815 on: Sun, 12 February 2017, 20:51:06 »
Just use US layout, it is one and real masta race! heh
In fact I use US layout for my keyboards, not JP one.

You may need to select JP layout only if you want to use JIS specific keys in Japanese input method.

When I set it to US, I don't get any output from the board.
❤️Keeboardz
---------------

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1816 on: Sun, 12 February 2017, 20:56:36 »
Just use US layout, it is one and real masta race! heh
In fact I use US layout for my keyboards, not JP one.

You may need to select JP layout only if you want to use JIS specific keys in Japanese input method.

When I set it to US, I don't get any output from the board.

Hmm, I never experienced that. Which os are you using?
And how did you set layout? Screen shots would be useful to explain your settings.


EDIT: Most of keys on Japanese keyboard still should work even with US or any other layouts, except for Japanese specific keys like henkan, muhenkan, kana(extra keys on bottom row), keys on left of Backspace and left of Right Shift.
https://en.wikipedia.org/wiki/File:KB_Japanese.svg

EDIT: Ah, found subject of your post says OSX. I don't have any OSX unfortunately and don't know much about how OSX handle keyboard layout. I confirmed Linux and WIndows have no problem there.
« Last Edit: Sun, 12 February 2017, 21:11:40 by hasu »
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline rsadek

  • Posts: 230
  • Location: Columbia, Maryland
  • raging keyboard monkey
Re: TMK keyboard firmware
« Reply #1817 on: Tue, 14 February 2017, 09:09:55 »
Just use US layout, it is one and real masta race! heh
In fact I use US layout for my keyboards, not JP one.

You may need to select JP layout only if you want to use JIS specific keys in Japanese input method.

When I set it to US, I don't get any output from the board.

Hmm, I never experienced that. Which os are you using?
And how did you set layout? Screen shots would be useful to explain your settings.


EDIT: Most of keys on Japanese keyboard still should work even with US or any other layouts, except for Japanese specific keys like henkan, muhenkan, kana(extra keys on bottom row), keys on left of Backspace and left of Right Shift.
https://en.wikipedia.org/wiki/File:KB_Japanese.svg

EDIT: Ah, found subject of your post says OSX. I don't have any OSX unfortunately and don't know much about how OSX handle keyboard layout. I confirmed Linux and WIndows have no problem there.


I am a big dummy. I wasn't waiting long enough for the board to boot up. In fact, I do receive output from the board and everything is just fine with it. So now I can ask you the questions I really want to know about configuring the keymap.


I would like to make the key left of space bar mean that LGUI and LALT have been pressed. What is the correct way to do this? Can it be done so that 3 keys are pressed (LGUI, LALT, LCTRL)?


-R
❤️Keeboardz
---------------

Offline a-c

  • Posts: 186
  • Location: USA
Re: TMK keyboard firmware
« Reply #1818 on: Tue, 14 February 2017, 10:26:15 »

I would like to make the key left of space bar mean that LGUI and LALT have been pressed. What is the correct way to do this? Can it be done so that 3 keys are pressed (LGUI, LALT, LCTRL)?


-R

ACTION_MODS

https://github.com/tmk/tmk_core/blob/master/doc/keymap.md#213-multiple-modifiers

Offline xandwich

  • Posts: 10
Re: TMK keyboard firmware
« Reply #1819 on: Thu, 23 February 2017, 11:49:09 »
Just compiled onekey_lufa and threw it on a 32u4 pro micro clone, and I've got a question:  lsusb will show the vendor/device IDs that I set in config.h, but not the manufacturer/product strings.  I've tried changing the lufa/descriptor.c lines where ManufacturerString.UnicodeString and ProductString.UnicodeString are specified, but can't get anything to show up in my lsusb output.

Is this a known bug or am I just doing something wrong? 

Offline xandwich

  • Posts: 10
Re: TMK keyboard firmware
« Reply #1820 on: Thu, 23 February 2017, 12:55:58 »
Problem solvedlsusb uses a builtin table to look up vendor/product strings.  usb-devices gives the correct values.

Online tjweir

  • * Exquisite Elder
  • Posts: 1183
  • Location: Toronto
Re: TMK keyboard firmware
« Reply #1821 on: Mon, 27 February 2017, 19:18:24 »
I just wanted to thank @hasu for TMK. I just finished a hand-made board and TMK made it simple to get working.

It's a split spacebar, green Alps, KMAC Mini inspired board.

Thanks @hasu!

 

Offline Ngt

  • * Elevated Elder
  • Posts: 2526
  • Location: Lyon, France
Re: TMK keyboard firmware
« Reply #1822 on: Sun, 02 April 2017, 09:53:57 »
Hello everyone!


I read through the Github documentation for TMK and it states that GH60 rev.A and rev.B have been both tested and I wonder if rev.C is compatible as well. Is it?


I feel like I already asked this here but I can't find it though. Please, forgive me if that's a duplicate.


Thanks for your time.

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline Tactile

  • Posts: 714
  • Location: Portland, OR
Re: TMK keyboard firmware
« Reply #1823 on: Sun, 02 April 2017, 12:14:39 »
Hello everyone!


I read through the Github documentation for TMK and it states that GH60 rev.A and rev.B have been both tested and I wonder if rev.C is compatible as well. Is it?


I feel like I already asked this here but I can't find it though. Please, forgive me if that's a duplicate.


Thanks for your time.

It works on the GH60 Rev C for programming the keyboard but I had trouble controlling the LEDs. I mean the LEDs on the WASD group, the arrow key group in the lower right corner, the FN key LED on the split right shift, etc.. I wanted to control these LEDs for layer indicators, Num Lock status, and stuff like that, and I had problems figuring out how to control them so I went with QMK instead. I'm not saying you can't do that in TMK, I'm saying it was easier for a dummy like me to do it in QMK.

As far as programming the keys, adding layers, etc. that all works perfectly as far as I can tell.

Offline Ngt

  • * Elevated Elder
  • Posts: 2526
  • Location: Lyon, France
Re: TMK keyboard firmware
« Reply #1824 on: Sun, 02 April 2017, 12:44:48 »
Hello everyone!


I read through the Github documentation for TMK and it states that GH60 rev.A and rev.B have been both tested and I wonder if rev.C is compatible as well. Is it?


I feel like I already asked this here but I can't find it though. Please, forgive me if that's a duplicate.


Thanks for your time.

It works on the GH60 Rev C for programming the keyboard but I had trouble controlling the LEDs. I mean the LEDs on the WASD group, the arrow key group in the lower right corner, the FN key LED on the split right shift, etc.. I wanted to control these LEDs for layer indicators, Num Lock status, and stuff like that, and I had problems figuring out how to control them so I went with QMK instead. I'm not saying you can't do that in TMK, I'm saying it was easier for a dummy like me to do it in QMK.

As far as programming the keys, adding layers, etc. that all works perfectly as far as I can tell.


Great thank you for your clarification.

Silenced Novatouch w/ Hack'd by Geeks

Sold: Ducky Zero Shine (Brown) | Poker 2 (Blue) | HHKB 55g Type-S

Offline leizzer

  • Posts: 8
Re: TMK keyboard firmware
« Reply #1825 on: Tue, 04 April 2017, 14:40:57 »
Hello,

I did a desktop app to generate keymaps for homemade keyboards and I'm sharing it to give something back to the community.

Github repo: https://github.com/leizzer/electroboard

Here is the post with more info https://geekhack.org/index.php?topic=88700.0

Cheers~

Offline comblups

  • Posts: 10
Re: TMK keyboard firmware
« Reply #1826 on: Sat, 15 April 2017, 10:21:08 »
I wanted to change the equals sign on the Numpad of an ISO AEK2 to ».«, so I changed the file converter/adb_usb/keymap_iso.c to this (don’t mind the FN0):

Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_EXT_ISO(
    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   FN0,
    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,DOT, PSLS,PAST,
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,ENT,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,                             P4,  P5,  P6,  PPLS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,          UP,           P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                               RGUI,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
    ),
};

That works fine, but now I have an M0118 (ISO) as well and wanted to use the Power Key as FN-Key and the keys 1 through 0 and the next two as F-Keys, F1 to F12, and swap Arrow Down and Arrow Right to come closer to a T-Nav, so I did this:

Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_EXT_ISO(
    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   FN0,
    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,DOT, PSLS,PAST,
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,ENT,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,                             P4,  P5,  P6,  PPLS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,          UP,           P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                               RGUI,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     NLCK,DOT, PSLS,PAST,
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC, ENT,     P7,  P8,  P9,  PMNS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,          P4,  P5,  P6,  PPLS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,  UP,     P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                          LEFT,DOWN,RGHT,     P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    TRNS,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,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,TRNS,TRNS,
    TRNS,TRNS,TRNS,         TRNS,                          TRNS,TRNS,TRNS,     TRNS,TRNS     ,TRNS
    ),
};

const action_t PROGMEM fn_actions[] = {
    ACTION_LAYER_MOMENTARY(1)
};

When I hit the Power Key, everything’s a mess (a lot of keys don’t do anything, the others produce wrong characters) and I have to unplug the Teensy and plug it back in again. Apart from that, the arrow keys are not swapped. What am I doing wrong?
« Last Edit: Sat, 15 April 2017, 10:26:11 by comblups »

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1827 on: Sat, 15 April 2017, 14:55:37 »
Power key is magic key in ADB converter, so you can remap it very limitedly.
https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb#magic-command

Remove this line to disable magic key, your keymap will work.
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/config.h#L55

⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline comblups

  • Posts: 10
Re: TMK keyboard firmware
« Reply #1828 on: Sat, 15 April 2017, 16:39:11 »
That doesn’t seem to work, I get errors in the make process.

Using the Power Key isn’t very comfortable, so I changed the keymap:

Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_EXT_ISO(
    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   FN0,
    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,DOT, PSLS,PAST,
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,ENT,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,                             P4,  P5,  P6,  PPLS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,          UP,           P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                               RGUI,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     FN3, DOT, PSLS,PAST,
    FN1, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,FN2, ENT,      P7,  P8,  P9,  PMNS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,          P4,  P5,  P6,  PPLS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,  UP,     P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                          LEFT,DOWN,RGHT,     P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    TRNS,F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,     FN3, TRNS,TRNS,TRNS,
    FN1, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN2, TRNS,     INS, HOME,PGUP,TRNS,
    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,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,TRNS,TRNS,     TRNS,TRNS     ,TRNS
    ),
};

const action_t PROGMEM fn_actions[] = {
    ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_DEL),
    ACTION_LAYER_TAP_KEY(1, KC_TAB),
    ACTION_LAYER_TAP_KEY(1, KC_RBRC),
    ACTION_LAYER_TOGGLE(1),
};

But that doesn’t work, FN1, FN2 and FN3 are being ignored. The numlock key is still a numlock, the arrow keys are not swapped, only PEQL gives DOT. I think, only the first layer is in use. Do I have to define two seperate const uint8_t PROGMEM keymaps, one for each keyboard model?

Offline hasu

  • Thread Starter
  • Posts: 2212
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: TMK keyboard firmware
« Reply #1829 on: Sat, 15 April 2017, 17:39:59 »
That doesn’t seem to work, I get errors in the make process.

Ah, coment out this line, instead of removing line in config.h
https://github.com/tmk/tmk_keyboard/blob/master/converter/adb_usb/Makefile#L77

Layer0 defined with KEYMAP_EXT_ISO() is used regardless of which keyboard you are using. You have to place FN3 on layer0(KEYMAP_EXT_ISO) even if your keyboard is M0118.

You can't have two different keymaps for both AEK and M0118 in one firmware.
⚠ My Engrish is broken.  TMK firmware  ⌨ HHKB Alt controller  ⌨Protocol Converters
Alps64

Offline comblups

  • Posts: 10
Re: TMK keyboard firmware
« Reply #1830 on: Sat, 15 April 2017, 18:18:31 »
Does that mean, I can’t swap the arrow keys on the M0118 without swapping them on the AEKII?

PS: I just noticed, the right most column on the M0118 from top to bottom is *, +, -, Enter, but *, -, +, Enter on the AEKII. Apple really liked to change layouts …

PPS: And Enter has to be one row down, next to NUHS (hash sign). This is what I’m using at the moment, works perfect:

Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_M0118_ISO(
    FN0,
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     FN3, DOT, PSLS,PAST,
    FN1, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,FN2,           P7,  P8,  P9,  PPLS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,ENT,      P4,  P5,  P6,  PMNS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,  UP,     P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                          LEFT,DOWN,RGHT,     P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    TRNS,F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,     FN3, TRNS,TRNS,TRNS,
    FN1, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN2,           INS, HOME,PGUP,TRNS,
    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,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,TRNS,TRNS,     TRNS,TRNS     ,TRNS
    ),
};

const action_t PROGMEM fn_actions[] = {
    ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_DEL),
    ACTION_LAYER_TAP_KEY(1, KC_TAB),
    ACTION_LAYER_TAP_KEY(1, KC_RBRC),
    ACTION_LAYER_TOGGLE(1),
};

Arrows swapped, F-keys and proper nav cluster instead of deactivated numpad.

PPPS: No, there’s one flaw, of course …

This is better:

Code: [Select]
#include "keymap_common.h"


const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    KEYMAP_M0118_ISO(
    FN0,
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     FN1, DOT, PSLS,PAST,
    FN2, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,FN3,           P7,  P8,  P9,  PPLS,
    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,ENT,      P4,  P5,  P6,  PMNS,
    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,  UP,     P1,  P2,  P3,
    LCTL,LALT,RALT,          SPC,                          LEFT,DOWN,RGHT,     P0,       PDOT,PENT
    ),
    KEYMAP_M0118_ISO(
    FN0,
    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     FN1, TRNS,TRNS,TRNS,
    FN2, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN3,           INS, HOME,PGUP,TRNS,
    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,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,TRNS,TRNS,     TRNS,TRNS     ,TRNS
    ),
    KEYMAP_M0118_ISO(
    FN0,
    TRNS,F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,     TRNS,TRNS,TRNS,TRNS,
    FN2, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN3,           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     ,TRNS
    ),
};

const action_t PROGMEM fn_actions[] = {
    ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_DEL),
    ACTION_LAYER_TOGGLE(1),
    ACTION_LAYER_TAP_KEY(2, KC_TAB),
    ACTION_LAYER_TAP_KEY(2, KC_RBRC),
};
« Last Edit: Sat, 15 April 2017, 19:00:04 by comblups »