Author Topic: USB to USB keyboard converter  (Read 104293 times)

0 Members and 2 Guests are viewing this topic.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #150 on: Tue, 06 September 2016, 22:46:20 »
Is programming macros possible with this converter? Will the 28kb limitation be a problem?

You can use 5KB at most to define keymap layers and macros. It consumes 256 bytes per layer and a few tens of bytes for simple short macro. That space seems to me enough in most cases but it depens completely on your usage.

Is there a max character length for macros and are delays possible, such as delay 1ms, 5ms, 10 ms, etc?

No length limt and you can delay any 0-255ms. But in my firmware macro doesn't look anything like fancy application from Logitech. It is C codes actually like this, very rough.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/keymap_hasu.c#L219-L239

No problem, I'm a quick learner  :)) Last question, can you press keys simultaneously with macros?

No, unfortunately. It is not interruptable and blocks completely other macros and human keystrokes during it runs.

That's fine. I have a Soarer converter and it does the same. Is that something that cannot be changed in the firmware? Either way, I like what I know now about your converter. OS will detect as 6KRO right? Soarer is NKRO only and it's a problem for me.

Right, USB-USB converter supports only 6KRO on both sides.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #151 on: Fri, 09 September 2016, 02:51:44 »
What is the new 'unimap'? I can't see any differences between UNIMAP and KEYMAP_ALL (which is what I've been using so far). But there are many keys. ;-)
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #152 on: Fri, 09 September 2016, 04:18:50 »
What is the new 'unimap'? I can't see any differences between UNIMAP and KEYMAP_ALL (which is what I've been using so far). But there are many keys. ;-)

Unimap is basically used to support keymap editor on web browser, so you don't have to use it if you edit keymap file and compile firmware from source. And unimap can support 128keys at most while existent keymap(and actionmap) support more keys(or all 256 keys).
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #153 on: Fri, 09 September 2016, 04:38:45 »
Oh. A thought: Would it be useful to make it possible to compile using the smaller map format of 128 keys, to produce layouts only 128 bytes in size? Then a layout definition would only take up 1/2 as much memory, leaving more device bytes for shortstrings and other stuff.

For 99% of purposes, I suppose that people would want to ignore the F13-24 etc keys if those even exist on their board. Those codes could just be passed through without remapping.
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #154 on: Fri, 09 September 2016, 20:17:19 »
It is absolutely possible by using 128 size matrix instead of 256. If you are sure about which keys you need it will be easy to shrink them to 128.
https://github.com/tmk/tmk_keyboard/blob/master/converter/usb_usb/usb_usb.cpp#L47-L52
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline mseaworthy

  • Posts: 63
Re: USB to USB keyboard converter
« Reply #155 on: Tue, 13 September 2016, 00:23:40 »
Wondering if anyone can offer a tip on getting a key layout accurate for a Matias Quiet Mini Pro on Hasu’s USB-to-USB Converter (http://matias.ca/miniquietpro/pc/)

In using Hasu’s new editor (nice work, Hasu!), I have swapped L-CTRL and and Caps Lock as well as backspace and back slash. I’m using the keyboard on a Windows 10 box but I can’t get the hex to load in Windows…but I’m flashing it without problems on OS X using DFU Programmer.

But I can’t seem to get the right side of the bottom row (all keys right of spacebar) accurately or the up arrow and right Shift on the second row. Also the odd-ball Delete, Page Up, Page Down are off. I have attached my .hex file.


Just an observation: Some of the TMK Keyboard Editor user interface elements are off or missing all together when I use Safari, but using Chrome there are no issues.

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #156 on: Tue, 13 September 2016, 00:42:25 »
Ok I want to make sure I get this right. I've successfully used the browser keymap to make the firmware and have flashed that to my converter and everything works. By my understanding is that by using the browser keymap is that it doesn't allow the making of macro keys. So all I have to do is edit keymap.c and then build the firmware?

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #157 on: Tue, 13 September 2016, 01:15:16 »
Wondering if anyone can offer a tip on getting a key layout accurate for a Matias Quiet Mini Pro on Hasu’s USB-to-USB Converter (http://matias.ca/miniquietpro/pc/)

In using Hasu’s new editor (nice work, Hasu!), I have swapped L-CTRL and and Caps Lock as well as backspace and back slash. I’m using the keyboard on a Windows 10 box but I can’t get the hex to load in Windows…but I’m flashing it without problems on OS X using DFU Programmer.

But I can’t seem to get the right side of the bottom row (all keys right of spacebar) accurately or the up arrow and right Shift on the second row. Also the odd-ball Delete, Page Up, Page Down are off. I have attached my .hex file.


Just an observation: Some of the TMK Keyboard Editor user interface elements are off or missing all together when I use Safari, but using Chrome there are no issues.

Did you install driver on Windows 10? You can use driver supplied by dfu-programmer or atmel FLIP. I can confirm dfu-programmer works on Windows 10.

You can check scan codes of the problematic keys with hid_listen. And share your keymap it would be helpful.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #158 on: Tue, 13 September 2016, 01:19:20 »
Ok I want to make sure I get this right. I've successfully used the browser keymap to make the firmware and have flashed that to my converter and everything works. By my understanding is that by using the browser keymap is that it doesn't allow the making of macro keys. So all I have to do is edit keymap.c and then build the firmware?

right. editor doens't support macro.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Sifo

  • Swaglord Yolomancer
  • * Exquisite Elder
  • Posts: 6419
  • Location: #GOLDSPRINGS, #LEGITBALLIN
Re: USB to USB keyboard converter
« Reply #159 on: Tue, 13 September 2016, 01:20:36 »
hmm would it be possible to make a universal bluetooth converter with your firmware
(Forever) Illustrious.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #160 on: Tue, 13 September 2016, 01:36:35 »
hmm would it be possible to make a universal bluetooth converter with your firmware

maybe possible but not sure flash space is still available for this. you will have to remove some features to save flash.
you need power bank, usb hub and bluetooth dongle.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline mseaworthy

  • Posts: 63
Re: USB to USB keyboard converter
« Reply #161 on: Tue, 13 September 2016, 08:23:21 »
Quote
Did you install driver on Windows 10? You can use driver supplied by dfu-programmer or atmel FLIP. I can confirm dfu-programmer works on Windows 10.

You can check scan codes of the problematic keys with hid_listen. And share your keymap it would be helpful.


I installed Flip but it hangs every time. I'm fine using dfu-programmer on the Mac so I have no issue with flashing the firmware. It's getting the right keymap from TMK Keyboard Editor--visually each key is assigned correctly in the Editor.

The bottom row to the right of the spacebar is all mixed up. Using the Switch Hitter software from ElitedKeyboards, I can see which codes are registered with each pressed key. I don't know how to show a keymap from the firmware but attached is an illustration of what's happening with the current hex I'm using.

148180-0
« Last Edit: Tue, 13 September 2016, 15:20:08 by mseaworthy »

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #162 on: Tue, 13 September 2016, 15:03:31 »
I need help

Error
Code: [Select]
usb_usb_keymap.o.d  keymap.c -o obj_usb_usb/keymap.o
keymap.c:11:313: error: macro "KEYMAP_DSI" passed 105 arguments, but takes just 104
keymap.c:5: error: 'KEYMAP_DSI' undeclared here (not in a function)
keymap.c:19:284: error: macro "KEYMAP_DSI" passed 105 arguments, but takes just 104
make: *** [obj_usb_usb/keymap.o] Error 1

custom entry in keymap_common.h
Code: [Select]
/* ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
 * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
 * `---'   `---------------' `---------------' `---------------' `-----------'
 * ,-----------------------------------------------------------. ,-----------. ,---------------.
 * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -|
 * |-----------------------------------------------------------| |-----------| |---------------|
 * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Retn| |Del|End|PgD| |  7|  8|  9|  +|
 * |------------------------------------------------------`    | `-----------' |-----------|   |
 * |CapsL |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  |    |               |  4|  5|  6|   |
 * |-----------------------------------------------------------|     ,---.     |---------------|
 * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |     |  1|  2|  3|   |
 * |-----------------------------------------------------------| ,-----------. |-----------|   |
 * |Ctl|Gui|Alt|           Space               |Alt|Gui|App|Ctl| |Lef|Dow|Rig| |      0|  .|   |
 * `-----------------------------------------------------------' `-----------' `---------------'
 */
#define KEYMAP_DSI( \
    K29,    K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45,      K46,K47,K48,                   \
    K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K31,K2A,  K49,K4A,K4B,  K53,K54,K55,K56, \
    K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,    K28,  K4C,K4D,K4E,  K5F,K60,K61,K57, \
    K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,                        K5C,K5D,K5E,     \
    KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38,        KE5,      K52,      K59,K5A,K5B,K58, \
    KE0,KE3,KE2,       K2C,                         KE6,KE7,K65,KE4,      K50,K51,K4F,  K62,    K63      \
) KEYMAP_ALL( \
            NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO,                                               \
    K29,    K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45,      K46,K47,K48,  NO, NO, NO, NO,  NO,      \
    K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K31,K2A,  K49,K4A,K4B,  K53,K54,K55,K56, NO, NO,  \
    K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,    K32,  K4C,K4D,K4E,  K5F,K60,K61,K57, NO, NO,  \
    K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,    NO,K28,                K5C,K5D,K5E,NO,  NO, NO,  \
    KE1,NO, K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38,    NO,KE5,      K52,      K59,K5A,K5B,NO,  NO, NO,  \
    KE0,KE3,KE2,NO,NO,     K2C,    NO, NO,NO,KE6,KE7,K65,KE4,  K50,K51,K4F,  K62,    K63,K58, NO, NO   \
)

#endif

my edited keymap.c
Code: [Select]
#include "keymap_common.h"

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

Trying to keep it simple by just changing 1 key but when I build the firmware I get errors
« Last Edit: Tue, 13 September 2016, 15:30:51 by Harima »

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #163 on: Tue, 13 September 2016, 15:32:58 »
Quote
Did you install driver on Windows 10? You can use driver supplied by dfu-programmer or atmel FLIP. I can confirm dfu-programmer works on Windows 10.

You can check scan codes of the problematic keys with hid_listen. And share your keymap it would be helpful.


I installed Flip but it hangs every time. I'm fine using dfu-programmer on the Mac so I have no issue with flashing the firmware. It's getting the right keymap from TMK Keyboard Editor--visually each key is assigned correctly in the Editor.

The bottom row to the right of the spacebar is all mixed up. Using the Switch Hitter software from ElitedKeyboards, I can see which codes are registered with each pressed key. I don't know how to show a keycap but attached is an illustration of what's happening with the current hex I'm using.

(Attachment Link)


What is actually your problem on Windows? Do you have error message or something? It would be helpful for other users to solve this and document it.

Hmm, I really have to document to explain how to use keymap editor keymap editor as soon as possible. Your cursor keys are sitll cursor keys on editor wherever they are placed on your kyeboard. Also other keys are. So this will work for you. http://goo.gl/YWo85a

Note that as the first post explains Fn key won't be recognized by the converter probably.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #164 on: Tue, 13 September 2016, 15:46:20 »
I need help

Error
Code: [Select]
usb_usb_keymap.o.d  keymap.c -o obj_usb_usb/keymap.o
keymap.c:11:313: error: macro "KEYMAP_DSI" passed 105 arguments, but takes just 104
keymap.c:5: error: 'KEYMAP_DSI' undeclared here (not in a function)
keymap.c:19:284: error: macro "KEYMAP_DSI" passed 105 arguments, but takes just 104
make: *** [obj_usb_usb/keymap.o] Error 1

Trying to keep it simple by just changing 1 key but when I build the firmware I get errors

Probably, you are messing with comma or something.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #165 on: Tue, 13 September 2016, 15:47:41 »
OK I fixed keymap.c code (CAPS was LCTRL, extra RO key, TRANS supposed to be TRNS)

Current error
Code: [Select]
usb_usb.cpp: In function 'uint8_t matrix_scan()':
usb_usb.cpp:129: error: expected primary-expression before '{' token
usb_usb.cpp:129: error: expected `;' before '{' token
make: *** [obj_usb_usb/usb_usb.o] Error 1

https://github.com/tmk/tmk_keyboard/blob/master/converter/usb_usb/usb_usb.cpp#L129
« Last Edit: Tue, 13 September 2016, 16:27:03 by Harima »

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #166 on: Tue, 13 September 2016, 16:28:50 »
OK I fixed some of the keymap.c code (CAPS was LCTRL, extra RO key)

Current error
Code: [Select]
usb_usb.cpp: In function 'uint8_t matrix_scan()':
usb_usb.cpp:129: error: expected primary-expression before '{' token
usb_usb.cpp:129: error: expected `;' before '{' token
make: *** [obj_usb_usb/usb_usb.o] Error 1

https://github.com/tmk/tmk_keyboard/blob/master/converter/usb_usb/usb_usb.cpp#L129

Did you compile firmware before editing keymap?
You better confirm whether you can compile without your change first.

I'm using GCC 4.9.2. I guess some version may have problem.
Code: [Select]
$ avr-gcc --version
avr-gcc (GCC) 4.9.2
Copyright (C) 2014 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.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #167 on: Tue, 13 September 2016, 19:16:45 »
Just an observation: Some of the TMK Keyboard Editor user interface elements are off or missing all together when I use Safari, but using Chrome there are no issues.

Thanks. I develop it with Chrome on Ubuntu, you will get better result with Chrome. But problem reports on other browsers would help me a lot.
I occasionally check with IE and Edge on Windows10 but it still has problems. And I found Safari on Windows so I'll check using it.

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline mseaworthy

  • Posts: 63
Re: USB to USB keyboard converter
« Reply #168 on: Tue, 13 September 2016, 22:50:34 »
Quote
Your cursor keys are sitll cursor keys on editor wherever they are placed on your kyeboard. Also other keys are. So this will work for you. http://goo.gl/YWo85a

Note that as the first post explains Fn key won't be recognized by the converter probably.

Hasu,
Thank you for helping me with the firmware for my USB-to-USB Connector. I am happy to report the link you supplied for me to the TMK Keymap Editor with the pre-populated keymap is much improved. I am only having one remaining issue.

It appears you programmed an HHKB arrow navigation cluster ([;’/) on Layer 1. I realize the Fn functionality is not programmable in the USB-to-USB connector so I tried using L-CTRL as a layer switcher (even though it appears there was no layer switching key designated in the keymap you supplied.

The HHKB arrow cluster did not work (as I suspected it wouldn’t), but pressing and holding L-CTRL + I resulted in Up arrow and L-CTRL + J resulted in Left arrow. However, when I hold and press L-CTRL + K, I just get “k.” And when I hold and press L-CTRL + L I get Down arrow (instead of the anticipated Right arrow).
This is odd for two reasons:

1) it doesn’t appear L-CTRL is anywhere in the keymap as a layer switcher nor are IJKL in the keymap as a navigation cluster (at least not visable in the TMK Keymap Editor)
2) with “I” and “J” working with L-CTRL I’d think “K” and “L” would also be working correctly (even though they don’t appear in the “visual” keymap).

In an attempt at troubleshooting, I added L-CTRL as a layer switcher to Layer 1 and moved the HHBK arrow cluster to IJKL. And oddly I got the exact same results as when there was no layer switcher and the arrow closer formatted for HHKB (namely, “I” and “J” worked as expected and “K” and “L” didn’t.

This is my uniformed guess, but I wonder if the USB-to-USB converter is transposing some key codes in the process of creating the hex file or if perhaps my Matias Quiet Mini Pro is partially incompatible with the converter (really hoping this is not the case).

My hope is to have IJKL as a home row arrow cluster on Layer 1 accessed by holding L-CTRL. Thank you for your innovative products and the tireless support.

Screen grabs are of the keymap you linked me to in the previous message (http://goo.gl/YWo85a). The hex file is from exporting the map you linked.
« Last Edit: Tue, 13 September 2016, 22:55:18 by mseaworthy »

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #169 on: Tue, 13 September 2016, 22:55:36 »
Did you compile firmware before editing keymap?
You better confirm whether you can compile without your change first.

I'm using GCC 4.9.2. I guess some version may have problem.
Code: [Select]
$ avr-gcc --version
avr-gcc (GCC) 4.9.2
Copyright (C) 2014 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.

Thank you. You were right. Was not able to compile properly, so I spent some time to learn how everything works. Made my first firmware and it worked! Now I can see if I can make a macro.

Edit: Fixed the problem I was having
« Last Edit: Tue, 13 September 2016, 23:47:41 by Harima »

Offline Sifo

  • Swaglord Yolomancer
  • * Exquisite Elder
  • Posts: 6419
  • Location: #GOLDSPRINGS, #LEGITBALLIN
Re: USB to USB keyboard converter
« Reply #170 on: Tue, 13 September 2016, 23:52:19 »
hmm would it be possible to make a universal bluetooth converter with your firmware

maybe possible but not sure flash space is still available for this. you will have to remove some features to save flash.
you need power bank, usb hub and bluetooth dongle.

I only need basic features. I'll have to look into what parts to get to build it
(Forever) Illustrious.

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #171 on: Wed, 14 September 2016, 00:59:01 »
Code: [Select]
        case HELLO:
            return (record->event.pressed ?
                    MACRO( I(0), T(H), T(E), T(L), T(L), W(255), T(O), END ) :
                    MACRO_NONE );

What's the syntax for adding delays?

Edit: After flashing this example, I was wondering why "O" was taking longer to type than the rest. W() is wait, and I now see it in the keymap.md. I'm learning :)
Edit2: I love this converter!
« Last Edit: Wed, 14 September 2016, 02:28:20 by Harima »

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #172 on: Wed, 14 September 2016, 07:51:19 »
MSeaworthy: Take a look at my Keymap Configuration post, under Online Editor:

https://forum.colemak.com/post/18410/#p18410

There you'll find a link to an editor layout with the CapsLock key as layer1 switcher and an arrow key cross on the OKL; keys (IJKL plus Wide mod). Test it out if you need guidance.

If you get arrow keys from Ctrl+I/J, I suspect it has nothing to do with the converter since the L-Ctrl key is only CapsLock in the keymap you linked to. Could be something your keyboard does, or something your OS does?

The layer1 switch must be on layer0 to work. Layer0 is the default.

As for your uniformed guess: As you were, soldier. ;-)
« Last Edit: Wed, 14 September 2016, 07:53:16 by DreymaR »
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline mseaworthy

  • Posts: 63
Re: USB to USB keyboard converter
« Reply #173 on: Wed, 14 September 2016, 09:48:24 »
Quote
The layer1 switch must be on layer0 to work. Layer0 is the default.

As for your uniformed guess: As you were, soldier. ;-)

@DreymaR thanks for your thoughtful response. Your blog post on USB devices and TMK is very helpful and informative. It turns out my layer switching was the issue (should have placed it on Layer 0). Your helpful page and Haus’s TMK Keymap Editor make this an embarrassment of riches for a customized keyboard experience. Thank you both so much for your contributions to the community!

Very useful post in getting started with TMK (a lot more than just colemak stuff)
https://forum.colemak.com/topic/2158-dreymars-big-bag-of-keyboard-tricks-usb2usb-edition/#p18410
« Last Edit: Wed, 14 September 2016, 09:54:56 by mseaworthy »

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #174 on: Fri, 16 September 2016, 21:04:50 »
Code: [Select]
        case ALT_TAB:
            return (record->event.pressed ?
                    MACRO( D(LALT), D(TAB), END ) :
                    MACRO( U(TAB), END ));

I'm having trouble with this kind of macro. LALT was being held down after macro finished so I added U(LALT), but then sometimes only TAB would be pressed.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #175 on: Fri, 16 September 2016, 21:17:45 »
Code: [Select]
        case ALT_TAB:
            return (record->event.pressed ?
                    MACRO( D(LALT), D(TAB), END ) :
                    MACRO( U(TAB), END ));

I'm having trouble with this kind of macro. LALT was being held down after macro finished so I added U(LALT), but then sometimes only TAB would be pressed.

It is a very dirty trick depending on current implementation of keymap framework which will be changed in future. So you are recommended not to use this trick.
This is very useful for my keymaps where I use this macro to switch applications with space+tab.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #176 on: Fri, 16 September 2016, 21:24:31 »
Code: [Select]
        case ALT_TAB:
            return (record->event.pressed ?
                    MACRO( D(LALT), D(TAB), END ) :
                    MACRO( U(TAB), END ));

I'm having trouble with this kind of macro. LALT was being held down after macro finished so I added U(LALT), but then sometimes only TAB would be pressed.

It is a very dirty trick depending on current implementation of keymap framework which will be changed in future. So you are recommended not to use this trick.
This is very useful for my keymaps where I use this macro to switch applications with space+tab.

OK, thank you. Could you explain to me the meaning of SM(), RM(), and CM() commands?

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #177 on: Fri, 16 September 2016, 22:46:12 »
Code: [Select]
        case ALT_TAB:
            return (record->event.pressed ?
                    MACRO( D(LALT), D(TAB), END ) :
                    MACRO( U(TAB), END ));

I'm having trouble with this kind of macro. LALT was being held down after macro finished so I added U(LALT), but then sometimes only TAB would be pressed.

It is a very dirty trick depending on current implementation of keymap framework which will be changed in future. So you are recommended not to use this trick.
This is very useful for my keymaps where I use this macro to switch applications with space+tab.

OK, thank you. Could you explain to me the meaning of SM(), RM(), and CM() commands?

To be honest I can't remember detail but I hope this expains them :D
https://github.com/tmk/tmk_keyboard/issues/116
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #178 on: Sat, 17 September 2016, 03:12:55 »
Is it possible to have tap toggle modifier as 1 tap to toggle, but if holding only momentary, and 2 taps to toggle off?

I want to retain the instantaneous nature of holding down the key without having the tapping term delay

Is it possible to remove the delay from all of the hold down actions? Like ACTION_LAYER_MOMENTARY or ACTION_MODS_TAP_TOGGLE
« Last Edit: Sat, 17 September 2016, 13:41:33 by Harima »

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #179 on: Sat, 17 September 2016, 17:14:48 »
Is it possible to have tap toggle modifier as 1 tap to toggle, but if holding only momentary, and 2 taps to toggle off?

I want to retain the instantaneous nature of holding down the key without having the tapping term delay

Is it possible to remove the delay from all of the hold down actions? Like ACTION_LAYER_MOMENTARY or ACTION_MODS_TAP_TOGGLE

You have to change codes directly but it is possible.
Number of taps to toggle can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default. But this is not what you want. It always toggles off with 1 tap, iirc.

'hold down actions'? for example?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #180 on: Sat, 17 September 2016, 20:41:21 »
Is it possible to have tap toggle modifier as 1 tap to toggle, but if holding only momentary, and 2 taps to toggle off?

I want to retain the instantaneous nature of holding down the key without having the tapping term delay

Is it possible to remove the delay from all of the hold down actions? Like ACTION_LAYER_MOMENTARY or ACTION_MODS_TAP_TOGGLE

You have to change codes directly but it is possible.
Number of taps to toggle can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default. But this is not what you want. It always toggles off with 1 tap, iirc.

'hold down actions'? for example?

Examples like ACTION_MODS_TAP_KEY(MOD_RSFT [Hold], KC_GRV [Tap]) or similar Dual Role keys with Hold and Tap.

For example I changed TAPPING_TOGGLE to 2. However when using ACTION_MODS_TAP_TOGGLE(MODS_LSFT), the momentary modifier by holding shift has a delay before the next key is modified, I have to wait a couple of seconds before the shift actually registers, and I presume it is because of the TAPPING_TERM 200(ms). If it is 0ms then obviously tapping toggle won't work. Right now I just changed TAPPING_TOGGLE to 0, made a key ACTION_LAYER_TOGGLE() that accesses a layer that has both ACTION_MODS_TAP_TOGGLE(MOD_LSFT) and ACTION_MODS_TAP_TOGGLE(MOD_LALT). This way I can access my regular layer with momentary shift and no delay and the other layer with toggle modifier shift. It would be much easier if I could just double tap Shift to toggle modifier but for my purpose I can't have the momentary modifier delay the next key.

Also, I tried to make macros that toggles the 2nd layer, presses toggle modifier, and then switches back to my regular layer but it doesn't work.

Probably easier if you looked at it:

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

const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
    /* 0: dsi */
    KEYMAP_HERMES(
        F13,           F14,             F15,           F16,           F17,          F18,               F19,            F20,           F21,               F22,             F23,          F24,                CLEAR,                                                                                                                                                                                       \
        ESC,          F1,               F2,             F3,             F4,            F5,                  F6,              F7,            F8,                 F9,              F10,            F11,               F12,                                                            PSCR,            SLCK,      BRK,                                                                                      \
        GRV,         1,                 2,               3,               4,                5,                  6,                7,               8,                   9,               0,                 MINS,            EQL,         BSPC,                                       INS,               HOME,    PGUP,            NLCK,       PSLS,         PAST,       PMNS,       \
        TAB,          Q,                W,              E,              R,               T,                   Y,               U,               I,                   O,               P,                LBRC,            RBRC,      BSLS,                                       DEL,            END,       PGDN,              P7,            P8,             P9,             PPLS,        \
        CAPS,         A,                S,               D,              F,                G,                  H,               J,                K,                  L,               SCLN,         QUOT,           ENT,                                                                                                                       P4,            P5,             P6,                               \
        LSFT,         Z,                X,               C,              V,                B,                  N,              M,               COMM,          DOT,          SLSH,                               RSFT,                                                                             UP,                                   P1,            P2,             P3,            PENT,         \
        LCTL,         LGUI,          LALT,                                                                   SPC,                                                  RALT,         FN0,                                 RCTL,                                                         LEFT,           DOWN,    RGHT,           P0,            PDOT),                         
    /* 1: FN1 */
    KEYMAP_HERMES(
        FN1,            FN2,           FN3,          FN4,          FN5,               FN6,           FN7,          FN8,              FN9,            FN10,         FN11,            FN12,          FN13,                                                                                                                                                                                               \
        TRNS,    TRNS,      TRNS,          TRNS,         TRNS,       TRNS,         TRNS,          TRNS,      TRNS,          TRNS,          TRNS,        TRNS,            TRNS,                                                           TRNS,     TRNS,     TRNS,                                                                                     \
        SLCK,    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,          TRNS,                               TRNS,                                                                             TRNS,                           TRNS,    TRNS,      TRNS,    TRNS,        \
        TRNS,    FN16,      TRNS,                                                                TRNS,                                                    TRNS,           TRNS,                              TRNS,                                                          TRNS,     TRNS,   TRNS,                TRNS,    TRNS),                                 
    /* 2: FN16 */
    KEYMAP_HERMES(
        FN1,            FN2,           FN3,          FN4,          FN5,               FN6,           FN7,          FN8,              FN9,            FN10,         FN11,            FN12,          FN13,                                                                                                                                                                                               \
        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,          TRNS,          TRNS,        TRNS,            TRNS,                                                                                                                    TRNS,    TRNS,      TRNS,                                  \
        FN17,    TRNS,      TRNS,          TRNS,         TRNS,       TRNS,         TRNS,          TRNS,      TRNS,          TRNS,          TRNS,                               TRNS,                                                                             TRNS,                           TRNS,    TRNS,      TRNS,    TRNS,        \
        TRNS,    TRNS,      FN18,                                                                TRNS,                                                    TRNS,           TRNS,                              TRNS,                                                          TRNS,     TRNS,   TRNS,                TRNS,    TRNS),                                 
};

/* id for user defined functions */
enum macro_id {
    MACRO_TAP_TOGGLE_SHIFT,
    MACRO_TAP_TOGGLE_ALT,
};

/*
 * Fn action definition
 */
#ifdef KEYMAP_SECTION_ENABLE
const action_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = {
#else
const action_t fn_actions[] PROGMEM = {
#endif
    /* DSI Layout*/
    [16] = ACTION_LAYER_TOGGLE(2),
    [17] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
    [18] = ACTION_MODS_TAP_TOGGLE(MOD_LALT),
};

/*
 * Macro definition
 */
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
    switch (id) {
        case MACRO_TAP_TOGGLE_SHIFT:
            return (record->event.pressed ?
                    MACRO( I(0), T(FN16), T(FN17), T(FN16), END ) :
                    MACRO_NONE );
        case MACRO_TAP_TOGGLE_ALT:
            return (record->event.pressed ?
                    MACRO( I(0), T(FN16), T(FN18), T(FN16), END ) :
                    MACRO_NONE );
    }
    return MACRO_NONE;
}






I've tried adding W() but I can't get the macros to work.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #181 on: Sat, 17 September 2016, 22:50:22 »
TMK implementaiton(Tapping) of dual role key puts priority on use of tap key while hold key(modifier/layer) suffer from it. Because I use tapping on keys like space and semicolon in my keymap and hope the keys behave as normal key as possible. But it is possible to implement reversely as you want and I have had a plan to write code but not tried it yet.

I think you can define your own toggle modifier in action_function(), refer this code.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/keymap_hasu.c#L254-L280

Probably this works for your purpose.
Code: [Select]
        case RSHIFT_TOGGLE:
            // RShift with 2-tap toogle
            if (record->event.pressed) {
                // very short hold recognized as a tap && other key is pressed during that
                if (record->tap.count > 0 && !record->tap.interrupted) {
                    if (record->tap.interrupted) {
                        dprint("tap interrupted\n");
                        register_mods(MOD_BIT(KC_RSHIFT));
                    }
                } else {
                    register_mods(MOD_BIT(KC_RSHIFT));
                }
            } else {
                // taps && other key is not pressed during that
                if (record->tap.count >= 2 && !(record->tap.interrupted)) {
                    // toggle Layer 1
                    if (layer_state & (1<<1)) {
                        layer_off(1);
                    } else {
                        layer_on(1);
                    }
                } else {
                    unregister_mods(MOD_BIT(KC_RSHIFT));
                }
            }
            break;

Unfortunately, you cannot use FN* codes in macro, iirc. I have no idea why W() doesn't work.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #182 on: Sun, 18 September 2016, 01:59:38 »
TMK implementaiton(Tapping) of dual role key puts priority on use of tap key while hold key(modifier/layer) suffer from it. Because I use tapping on keys like space and semicolon in my keymap and hope the keys behave as normal key as possible. But it is possible to implement reversely as you want and I have had a plan to write code but not tried it yet.

I think you can define your own toggle modifier in action_function(), refer this code.
https://github.com/tmk/tmk_keyboard/blob/master/keyboard/hhkb/keymap_hasu.c#L254-L280

Probably this works for your purpose.
Code: [Select]
snip

Unfortunately, you cannot use FN* codes in macro, iirc. I have no idea why W() doesn't work.

Code: [Select]
keymap.c: In function 'action_function':
keymap.c:125:25: error: 'layer_state' undeclared (first use in this function)
                     if (layer_state & (1<<1)) {
                         ^
keymap.c:125:25: note: each undeclared identifier is reported only once for each function it appears in
keymap.c:126:25: warning: implicit declaration of function 'layer_off' [-Wimplicit-function-declaration]
                         layer_off(1);
                         ^
keymap.c:128:25: warning: implicit declaration of function 'layer_on' [-Wimplicit-function-declaration]
                         layer_on(1);
                         ^

I get this error when trying to compile. Tried searching  the repository for an answer, but I still can't figure it out

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #183 on: Sun, 18 September 2016, 02:55:11 »
In C you have to include header file to show compiler prototype of functions you are using.  You can use text file searching tool like 'grep' or 'ctags' to find the header file.

In short add this line in your keymap :p
Code: [Select]
#include "action_layer.h "
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Harima

  • Posts: 26
Re: USB to USB keyboard converter
« Reply #184 on: Sun, 18 September 2016, 12:37:36 »
In short add this line in your keymap :p



Ok now that I've tried it it seems to still have momentary delay
I think what I want is a limitation of Tapping in current implementation

TMK implementaiton(Tapping) of dual role key puts priority on use of tap key while hold key(modifier/layer) suffer from it. Because I use tapping on keys like space and semicolon in my keymap and hope the keys behave as normal key as possible. But it is possible to implement reversely as you want and I have had a plan to write code but not tried it yet.
Please let me know when you do  ;D

« Last Edit: Sun, 18 September 2016, 15:28:14 by Harima »

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #185 on: Sun, 09 October 2016, 17:11:09 »
Just ordered Arduino Leonardo and USB host shield.  Let's see if I can not screw this one up.

Offline moparisthebest

  • Posts: 4
Re: USB to USB keyboard converter
« Reply #186 on: Tue, 11 October 2016, 15:42:56 »
Has anyone tried to get this working with the new Teensy 3.6 ?

https://www.kickstarter.com/projects/paulstoffregen/teensy-35-and-36/description

It has a USB host port built-in, so that should *just work* without additional components right?  I just got one in the mail, just have to solder the USB leads on and I can start playing with it.

Offline DreymaR

  • Posts: 184
  • Location: Norway
  • Colemak forum guy
    • DreymaR's Big Bag of Kbd Tricks
Re: USB to USB keyboard converter
« Reply #187 on: Wed, 12 October 2016, 03:23:10 »
Oh, that looks so awesome! With the built-in USB host, 1 Mb flash and 256 kb RAM this gives us enough room for all the hotstrings one can imagine and whatnot. It looks very very nice.
Better burden you cannot carry than man-wisdom much ~ Hávamál

Offline KHAANNN

  • Posts: 1620
Re: USB to USB keyboard converter
« Reply #188 on: Wed, 12 October 2016, 04:28:31 »
Indeed, I hope we can get it work with Teensy 3.6, It would be the definite solution

There are so many things I want to do with the keyboard, but being limited by the flash capacity
Endgame | 1.25 Cmd for GMK Sets Please | Or Just 1.25 Blanks Like The Good Old Days

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #189 on: Sun, 16 October 2016, 20:27:09 »
So I got myself an Arduino Leonardo and USB host shield.  When I try to load my hex file, I get the following message -

Quote
avrdude: butterfly_recv(): programmer is not responding

I'm guessing it has something to do with keeping Leonardo in bootloader mode.  I'd appreciate any help in figuring this out.
« Last Edit: Mon, 17 October 2016, 07:57:04 by Salt Peanuts »

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #190 on: Mon, 17 October 2016, 11:12:51 »
So I got myself an Arduino Leonardo and USB host shield.  When I try to load my hex file, I get the following message -

Quote
avrdude: butterfly_recv(): programmer is not responding

I'm guessing it has something to do with keeping Leonardo in bootloader mode.  I'd appreciate any help in figuring this out.

Bootloader of Leonardo may change serial port device in some cases and times out in 8 seconds. You have to find correct port name somehow and type command in the period, this is not so easy job. You will eventually get the gist of that after some tries.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #191 on: Mon, 17 October 2016, 11:58:15 »
Bootloader of Leonardo may change serial port device in some cases and times out in 8 seconds. You have to find correct port name somehow and type command in the period, this is not so easy job. You will eventually get the gist of that after some tries.
Thanks for the info, and I'm glad I have one converter from you coming my way.  Hopefully, I'll get Leonardo working soon, but I think chances are just as good I'll throw it against a wall in fit of frustration (at which point I'll need to get another converter from you).

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #192 on: Tue, 18 October 2016, 03:32:17 »
Fixed LED indicator state at plugging-in, keyboard should display correct LED state from the beginning now. Upto this point it doesn't show indicators until pressing one of caps lock, scroll lock or num lock keys.
https://github.com/tmk/tmk_keyboard/commit/51326077b085ad5c82cb0ea7c63405364c052cd5

Firmware on keymap editor was also updated for this.
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #193 on: Tue, 18 October 2016, 20:31:20 »
So I finally got my Leonardo/USB Host Shield working - I just wasn't getting Leonardo into bootloader mode properly.  It worked perfectly with my CODE TKL but did not play nice with my QFR w/ Frosty Flake running TMK.  The default layer worked fine but other layers would only work inconsistently.  Additionally, it did not work at all with my Kinesis Advantage2 keyboard.  This was disappointing for me as I really wanted to add some TMK features to my Advantage2.  I have an previous model Advantage coming my way tomorrow so I'll try it out with that as well.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #194 on: Tue, 18 October 2016, 20:57:59 »
So I finally got my Leonardo/USB Host Shield working - I just wasn't getting Leonardo into bootloader mode properly.  It worked perfectly with my CODE TKL but did not play nice with my QFR w/ Frosty Flake running TMK.  The default layer worked fine but other layers would only work inconsistently.  Additionally, it did not work at all with my Kinesis Advantage2 keyboard.  This was disappointing for me as I really wanted to add some TMK features to my Advantage2.  I have an previous model Advantage coming my way tomorrow so I'll try it out with that as well.

Nice. Leonardo bootlader is a little tedious to handle with command line :D

Interesting. what is your keymap on QFR like?

Kinetis advantage2 is NKRO? has USB hub or some extra device in it?

TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #195 on: Tue, 18 October 2016, 21:55:03 »
Nice. Leonardo bootlader is a little tedious to handle with command line :D

Interesting. what is your keymap on QFR like?

Kinetis advantage2 is NKRO? has USB hub or some extra device in it?
My QFR has Colemak, QWERTY, and function layers.  The keymap on Leonardo is just Colemak and SpaceFN layers.  Arrow keys in SpaceFN works, but none of the other keys (media/volume keys, Ctrl/ESC dual-role, etc.) work properly.

Advantage2 is 6KRO.  I've tried few different USB ports both on hub and motherboard without any success. 

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #196 on: Wed, 19 October 2016, 02:56:21 »
Nice. Leonardo bootlader is a little tedious to handle with command line :D

Interesting. what is your keymap on QFR like?

Kinetis advantage2 is NKRO? has USB hub or some extra device in it?
My QFR has Colemak, QWERTY, and function layers.  The keymap on Leonardo is just Colemak and SpaceFN layers.  Arrow keys in SpaceFN works, but none of the other keys (media/volume keys, Ctrl/ESC dual-role, etc.) work properly.

Advantage2 is 6KRO.  I've tried few different USB ports both on hub and motherboard without any success. 

Media control keys  on keyboard don't work, this is limitation of the converter as described in first post. I confirmed dual role keys have problem with the converter, those keys send irregular key events too quickly and it is part of the problem. Another part is USB converter, which cannot handle the irregular events. I'll be able to fix this problem but it takes time.

I have no idea about problem with Kinesis at this point. Does hid_listen display any debug info when plugging the keyboard?
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt

Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #197 on: Wed, 19 October 2016, 06:47:03 »
Media control keys  on keyboard don't work, this is limitation of the converter as described in first post. I confirmed dual role keys have problem with the converter, those keys send irregular key events too quickly and it is part of the problem. Another part is USB converter, which cannot handle the irregular events. I'll be able to fix this problem but it takes time.

I have no idea about problem with Kinesis at this point. Does hid_listen display any debug info when plugging the keyboard?
I meant the media control keys programmed onto the converter.  FWIW, everything works great when the converter is used with CODE TKL.  I'm wondering if the TMK/keymaps on QFR/FF is having some weird conflicts with the converter, especially since I haven't updated the TMK on QFR/FF in a looooong time.  In a grand scheme of things, this isn't a problem for me seeing as my QFR/FF is already running just fine on TMK.

I'll check the Advantage2 again later today.


Offline Salt Peanuts

  • Posts: 39
Re: USB to USB keyboard converter
« Reply #198 on: Wed, 19 October 2016, 20:14:20 »
No debug info on hid_listen with Advantage2.  It does make two small beeps when plugging it into Leonardo, just like it does when plugged in regularly, but none of the keys respond.

The converter does work just fine with the original Advantage model.

Offline hasu

  • Thread Starter
  • Posts: 2768
  • Location: Tokyo, Japan
  • @tmk
    • tmk keyboard firmware project
Re: USB to USB keyboard converter
« Reply #199 on: Wed, 19 October 2016, 21:02:44 »
Advantage2 has intresting 'v-drive' funciton by which you can access keyboard configuration through virtual USB storage. I guess this leads the keyboard to a complex USB device while the converter expected simple keyboard.


Quote
Because the Advantage2 is a multimedia keyboard that can present itself to the computer as a virtual flash drive, it may not be compatible with all KVM switches. See the Advantage2 Resource page for information on compatibility.
http://www.kinesis-ergo.com/support/technical-support/troubleshooting-advantage2-keyboard/

And resources of Advantage2.
http://www.kinesis-ergo.com/advantage2-resources/


If you can share USB descriptor of the keyboard it would be useful to track this issue deep.
https://github.com/tmk/tmk_keyboard/wiki/HID-Report-Descriptor
TMK products:HHKB Alt  ⌨ConvertersAlps64FC660C AltFC980C Alt