Author Topic: Why don't I need to define all the keys pin and row  (Read 3219 times)

0 Members and 1 Guest are viewing this topic.

Offline yzdnegel

  • Thread Starter
  • Posts: 16
Why don't I need to define all the keys pin and row
« on: Mon, 05 July 2021, 12:29:30 »
So I'm in the middle of replacing my TKL keyboard with a teensy++ 2.0 to make it programmable with QMK and support OLED, trackpoint and a rotary encoder.
I got told that I needed to map every key and document which row and col each key has. I just read about the QMK firmware but it doesn't require me to assign each key a row or col. So how does QMK which key is which? The keymaps seems to be just keys put in places.

Bonus question ;D Does anyone have a comprehensive guide of how to use QMK? There seems to be some guides but they only touch the keymaps, rules and sometimes config... so what are the other files "keyboardname.c" and "keyboardname.h"?

Thanks!

Offline nevin

  • Posts: 1646
  • Location: US
Re: Why don't I need to define all the keys pin and row
« Reply #1 on: Mon, 05 July 2021, 13:43:26 »
1. are you handwiring or trying to use the existing pcb for the matrix?
2. if it has a plate, and you're keeping the plate, it might be easier to handwire. (not really as scary as it sounds)
3. what TKL do you have?

- you have to define the electrical matrix as well as the physical matrix

physical will look something like this (which is transposed from the electrical matrix below)
Quote
#define LAYOUT_tkl_iso( \
    k00,      k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D,      k0E, k0F, k0G, \
    k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D,      k1E, k1F, k1G, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C,           k2E, k2F, k2G, \
    k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B,      k4D,           k4F, \
    k50, k51, k52,                k57,                k5A, k5B, k5C, k5D,      k5E, k5F, k5G \
)
electrical will look something like this:

Quote
{ \
    { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \
    { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX, k1D, k1E, k1F, k1G }, \
    { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \
    { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \
    { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \
    { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \
}

...taken from the phantom tkl

keyboardname.h is the matrix stuff like code above
keyboardname.c is very little of the config stuff, most is in config.h

if you're a trackpoint fan, check out https://tex.com.tw/
and there was this too... modified tipro https://deskthority.net/viewtopic.php?f=8&t=4214&start=
« Last Edit: Mon, 05 July 2021, 14:02:52 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline yzdnegel

  • Thread Starter
  • Posts: 16
Re: Why don't I need to define all the keys pin and row
« Reply #2 on: Mon, 05 July 2021, 14:42:30 »

Quote
{ \
    { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \
    { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX, k1D, k1E, k1F, k1G }, \
    { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \
    { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \
    { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \
    { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \
}

...taken from the phantom tkl

keyboardname.h is the matrix stuff like code above
keyboardname.c is very little of the config stuff, most is in config.h

if you're a trackpoint fan, check out https://tex.com.tw/
and there was this too... modified tipro https://deskthority.net/viewtopic.php?f=8&t=4214&start=


1. are you handwiring or trying to use the existing pcb for the matrix?
2. if it has a plate, and you're keeping the plate, it might be easier to handwire. (not really as scary as it sounds)
3. what TKL do you have?

- you have to define the electrical matrix as well as the physical matrix

physical will look something like this (which is transposed from the electrical matrix below)
Quote
#define LAYOUT_tkl_iso( \
    k00,      k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D,      k0E, k0F, k0G, \
    k01, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1D,      k1E, k1F, k1G, \
    k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C,           k2E, k2F, k2G, \
    k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \
    k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B,      k4D,           k4F, \
    k50, k51, k52,                k57,                k5A, k5B, k5C, k5D,      k5E, k5F, k5G \
)
electrical will look something like this:

Quote
{ \
    { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G }, \
    { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, XXX, k1D, k1E, k1F, k1G }, \
    { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, XXX, k2E, k2F, k2G }, \
    { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, XXX, XXX, XXX }, \
    { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, XXX, k4D, XXX, k4F, XXX }, \
    { k50, k51, k52, XXX, XXX, XXX, XXX, k57, XXX, XXX, k5A, k5B, k5C, k5D, k5E, k5F, k5G } \
}

...taken from the phantom tkl

keyboardname.h is the matrix stuff like code above
keyboardname.c is very little of the config stuff, most is in config.h

if you're a trackpoint fan, check out https://tex.com.tw/
and there was this too... modified tipro https://deskthority.net/viewtopic.php?f=8&t=4214&start=

Yes, you are correct. I'm trying to use my pcb as matrix... I feel like it's less work than to wire an entire TKL keyboard. I have a Cooler master S PBT keyboard.

Thanks! helped a lot!

Offline nevin

  • Posts: 1646
  • Location: US
Re: Why don't I need to define all the keys pin and row
« Reply #3 on: Mon, 05 July 2021, 15:08:23 »
Masterkeys S?

if it is... have to check out. could save you a TON of work https://1upkeyboards.com/shop/controllers/unloved-bastard-controller/

if not, you're probably going to have to chop up your pcb for the additional components you are attempting to add. so you might as well handwire.

lcd's are kinda "fluff" not really that useful if you program your own board (you'll know what layout etc, you're on)

there's also some great offerings form keeb.io (you'd have to add trackpoint, but it's two out of the three requests, plus the option of using split)
Sinc https://keeb.io/collections/sinc
KBO-5000 https://keeb.io/collections/kbo-5000-split-staggered-80-keyboard
(i am a little biased.... i have a couple of keeb.io's kits and absolutely LOVE them)

also, some others....
Satisfaction 75
isometria-75
Beezenbach70
EPTKL - TKL w/ Slider, Rotary encoder and more
GMMK PRO

... looking at the code for the unloved bastard... that is definitely a screwey matrix.
271841-0
« Last Edit: Mon, 05 July 2021, 15:31:05 by nevin »
Keeb.io Viterbi, Apple m0110, Apple m0120, Apple m0110a, Apple 658-4081, Apple M1242, Apple AEK II, MK96, GH60/Pure, Cherry g84-4100, Adesso AKP-220B, Magicforce 68

Offline yzdnegel

  • Thread Starter
  • Posts: 16
Re: Why don't I need to define all the keys pin and row
« Reply #4 on: Mon, 05 July 2021, 16:28:55 »
Masterkeys S?

if it is... have to check out. could save you a TON of work https://1upkeyboards.com/shop/controllers/unloved-bastard-controller/

if not, you're probably going to have to chop up your pcb for the additional components you are attempting to add. so you might as well handwire.

lcd's are kinda "fluff" not really that useful if you program your own board (you'll know what layout etc, you're on)

there's also some great offerings form keeb.io (you'd have to add trackpoint, but it's two out of the three requests, plus the option of using split)
Sinc https://keeb.io/collections/sinc
KBO-5000 https://keeb.io/collections/kbo-5000-split-staggered-80-keyboard
(i am a little biased.... i have a couple of keeb.io's kits and absolutely LOVE them)

also, some others....
Satisfaction 75
isometria-75
Beezenbach70
EPTKL - TKL w/ Slider, Rotary encoder and more
GMMK PRO

... looking at the code for the unloved bastard... that is definitely a screwey matrix.
(Attachment Link)

Omg... yes I have the Masterkeys S. I was looking for a replacement MCU but only found "frosty flake" and this site: https://deskthority.net/wiki/Costar_replacement_controllers
Unloved bastard would be so nice... unfortunately I have all the parts (teensy++ 2.0, oled, rotary encoders and more) on the way already :/

My endgame build would definitely be a sinc with a full aluminium case  ;D my current cooler master keyboards is just a stepping stone for what's about to come  :D

EDIT: I meant Quefrency not Sinc xD

So I found this website: kbfirmware.com which solved my problem. They let you assign each key with a row and a column, which gave me the attached code. Next is to somehow make the OLED, rotary encoder and trackpoint work... which is probably the biggest hurdle. My plan is to use other peoples code in qmk_firmware folder and try to work together some working code.

The OLED doesn't serve any "useful" purpose, but I had an idea that if my WPM ever reached above, lets say 70, the OLED would show flames (see the attached gif). I got the idea from guitar hero where the fingers are on fire when you are on a streak or something  :p
« Last Edit: Mon, 05 July 2021, 16:52:32 by yzdnegel »

Offline Tactile

  • Posts: 1433
  • Location: Portland, OR
Re: Why don't I need to define all the keys pin and row
« Reply #5 on: Mon, 05 July 2021, 16:32:42 »
Each key has to be assigned a row/column. However, not all rows/columns have to be complete, or fully filled. It's quite common for a keyboard matrix to have blank spots, or gaps, in one or more rows or columns. As long as all the keys you want to work are in there, the extra positions are just left blank and no problem.
REΛLFORCE