kairyu / tkg

TMK Keymap Generator
http://tkg.io
97 stars 30 forks source link

Can't got correct key-map and how make caps lock indicator works #6

Closed Habens closed 8 years ago

Habens commented 8 years ago

Hi Kair,

tkg project is awesome. thanks for you contribution.

Currently I got two question, could you help me to figure out what happened?

_1st_: I wanna covert the HHKB layout created by layout created by keyboard-layout-editor to a keymap. But looks it not works like what I want. below is the raw data generate by this site:

[{a:2},"Esc\n\n\n\nPower",{a:0},"!\n1\n\n\nF1","@\n2\n\n\nF2","#\n3\n\n\nF3","$\n4\n\n\nF4","%\n5\n\n\nF5","^\n6\n\n\nF6","&\n7\n\n\nF7","*\n8\n\n\nF8","(\n9\n\n\nF9",")\n0\n\n\nF10","_\n-\n\n\nF11","+\n=\n\n\nF12","|\n\\\n\n\nIns","~\n`\n\n\ndel"],
[{a:2,w:1.5},"Tab\n\n\n\nCaps",{a:4},"Q","W","E",{a:0},"R\n\n\n\nSelect","T\n\n\n\nprev","Y\n\n\n\nplay","U\n\n\n\nnext","I\n\n\n\nPSc\nSRq","O\n\n\n\nScrLk","P\n\n\n\nPus\nBrk","{\n[\n\n\n↑",{a:4},"}\n]",{a:2,w:1.5},"Delete\n\n\n\nBS\nClear"],
[{a:6,w:1.75},"Control",{a:0},"A\n\n\n\nVol_Dn","S\n\n\n\nVol_Up","D\n\n\n\nMute","F\n\n\n\nEject",{a:4},"G","H\n\n\n\n*","J\n\n\n\n/",{a:0},"K\n\n\n\nHome","L\n\n\n\nPgUp",":\n;\n\n\n←","\"\n'\n\n\n→",{a:2,w:2.25},"Return\n\n\n\n\nEnter"],
[{a:6,w:2.25},"Shift",{a:4},"Z","X","C","V","B","N\n\n\n\n+","M\n\n\n\n-",{a:0},"<\n,\n\n\nEnd",">\n.\n\n\nPgDn","?\n/\n\n\n↓",{a:6,w:1.75},"rshift","Fn"],
[{x:1.25,w:1.25},"Opt",{w:1.25},"Command",{a:7,w:6.25},"",{a:2,w:1.25},"rCommand\n\n\n\nStop",{a:6},{w:1.25},"rOpt"]

and what I want the keymap matrix should be:

KEYMAP_TKG(
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSLS, GRV, \
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSPC,      \
    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,       \
    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,FN0,       \
    NO,  LALT,LGUI,          SPC,                     RGUI,RALT,NO,NO),

but the matrix of generate keymap is:

KEYMAP_TKG(
    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSLS, \
    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,DEL,  \
    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,  \
    LSFT,     Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,FN0, RSFT, \
         LALT,LGUI,          TRNS,               GRV, RGUI,RALT),

the GRV is incorrect place.

_2nd_: How to make the _caps lock indicator_ works.

The indicator works fine when I fresh my keyboard by tkg-toolkit with attached .eep file.
However, I wanna different keymap, as 1st question mentioned, currently I think I can't get the correct .eep file from TKG. And I don't know how to modify the .eep file
I can change the .c file to the keymap I want. But the indicator is not works after freshed keyboard use the .c file with tmk_keyboard.

So is there any way to make the indicator works using the .c file to fresh keyboard? or, could you help me to figure out that is there any issue on my .c file?

kairyu commented 8 years ago

Hi Habens,

Thank you very much for your feedback.

1st: Don't worry. The GRV is in the correct place. The key split from backspace is mapped to row5-col10 of the matrix both for the original GH60 and some other copies (I guess you are talking about GH60). So it should not be a problem.

2nd: Since the 1st question should not be a problem, please try again and find the actual cause of your problem.

Anyway please clarify the version/revision of your PCB. The original tmk_keyboard only supports GH60 RevA/B/C, so if you have other version and compiled a firmware with the original tmk_keyboard, some feature may not work properly on your PCB.

And for your last question, indicators such as caps lock are handled by led.c but not keymap.c. If you want to customize the behavior of indicators, you can take a look at your led.c file.

Habens commented 8 years ago

You are correctly. My keyboard and caps lock indicator work well after re-fresh. Thank you!