Seems to me that you have taken out all kinds of stuff from the source. Before you take out functions or macros or other stuff from the source, you basically need to find out where it is used and take out all references, too.rockosmodlife wrote: ↑Now I get the following:
keymap_common.c: In function 'keymap_fn_to_action':
keymap_common.c:29: error: 'fn_actions' undeclared (first use in this function)
How to build your very own keyboard firmware
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
@nicstreet: I have used Teensy 2.0 and Teensy++ 2.0, and they both work. Teensy 3.x models have a totally different architecture based on ARM Chips instead of AVR chips, so the controller has to be ported to that architecture to work. There's a thread about that, it's a work in progress. The Mini Pro should work I think (haven't tried it), you'll have to configure the software and compile it for the ATmega328.
I have bluetoothed my IBM SSK with a Teensy++ 2.0 and an Adafruit Bluefruit EZKey, but that one is preconfigured for keyboard applications. Some code for that one is inside Hasu's TMK software (not by me, search for bluefruit in the code) so you can maybe take that as a start.
I have bluetoothed my IBM SSK with a Teensy++ 2.0 and an Adafruit Bluefruit EZKey, but that one is preconfigured for keyboard applications. Some code for that one is inside Hasu's TMK software (not by me, search for bluefruit in the code) so you can maybe take that as a start.
-
- Location: United Kingdom
- Main keyboard: Custom 65% (Gateron Blue-Gateron Black MODS)
- Main mouse: Logitech M235
- Favorite switch: Gateron Blue
- DT Pro Member: -
Thanks Halvar, very useful... I'll likely get a bit of time to invest over Xmas (trusting I can drag myself away from the kids toys ) I'll likely start with the Mini Pro and see how I progress, could be slow as I'm by no means an experienced dev.
-
- Location: Estonia
- Main keyboard: HHKB Pro 1
- Main mouse: Razer Deathadder 2013
- Favorite switch: Topre
- DT Pro Member: -
Hello, super thankful for the guide!
Like many, I also ran into some issues, but for some reason this one makes no sense to me: I'm trying to create a neutrino build, and I got everything (In my mind) set up correctly, I've even read the amount of lines and code and keys over at least 30 times now. I got rid of many problems by troubleshooting, but I can't just find an answer to this one.
Here is my keymap_poker.c:
http://pastebin.com/FYDq8YRM
Here is my keymap_common.h:
http://pastebin.com/EWinVHLz
I get this error and I don't know any way to fix this:
https://i.gyazo.com/d132d90b124d4ee3f2b ... f28603.png
I've been trying to create my own firmware since 1 am or even earlier, and its 4:20 am right now, I feel like I'm going crazy, but I can't stop while achieving nothing, so I figured that I'll just give in and ask for help
EDIT: Alright I woke up today and fixed that issue in 5 minutes, came out that I forgot to save my config.c file, so I had 14 columns instead of 15, and the poker keymap file had 15 columns in the fourth row instead of 14 and was missing a comma
Like many, I also ran into some issues, but for some reason this one makes no sense to me: I'm trying to create a neutrino build, and I got everything (In my mind) set up correctly, I've even read the amount of lines and code and keys over at least 30 times now. I got rid of many problems by troubleshooting, but I can't just find an answer to this one.
Here is my keymap_poker.c:
http://pastebin.com/FYDq8YRM
Here is my keymap_common.h:
http://pastebin.com/EWinVHLz
I get this error and I don't know any way to fix this:
https://i.gyazo.com/d132d90b124d4ee3f2b ... f28603.png
I've been trying to create my own firmware since 1 am or even earlier, and its 4:20 am right now, I feel like I'm going crazy, but I can't stop while achieving nothing, so I figured that I'll just give in and ask for help
EDIT: Alright I woke up today and fixed that issue in 5 minutes, came out that I forgot to save my config.c file, so I had 14 columns instead of 15, and the poker keymap file had 15 columns in the fourth row instead of 14 and was missing a comma
- awkwrdm3
- Location: United States
- Main keyboard: WASD
- Main mouse: g700
- Favorite switch: mx clear
- DT Pro Member: -
I'm building a 60% board.... so i'm going off the guilds that are really well put together!!! THANKS.
I have a few questions.
1) I'm using a Teensy 3.2, will this guild still work for the 3.2?
2) The "Setting up the rows and columns" part of the guide talks about pins with names like "f7" ... the 3.2 does not have that naming system. and I have looked all over and found nothing that talks about this.(making me go back to question 1)
for now thats all my question i'm sure there will be more;)
I have a few questions.
1) I'm using a Teensy 3.2, will this guild still work for the 3.2?
2) The "Setting up the rows and columns" part of the guide talks about pins with names like "f7" ... the 3.2 does not have that naming system. and I have looked all over and found nothing that talks about this.(making me go back to question 1)
for now thats all my question i'm sure there will be more;)
- matt3o
- -[°_°]-
- Location: Italy
- Main keyboard: WhiteFox
- Main mouse: Anywhere MX
- Favorite switch: Anything, really
- DT Pro Member: 0030
- Contact:
Hasu recently added teensy 3 (indeed the whitefox that has the same controller runs on the TMK) but I'm afraid some more work is needed.
I'll talk to Hasu to see if I can make a tutorial.
I'll talk to Hasu to see if I can make a tutorial.
- flabbergast
- Location: Southampton, UK
- DT Pro Member: 0120
- Contact:
I'm working with hasu on ARM Teensies (i.e. LC, 3.x) support in TMK, build on top of chibios. It is still relatively early days (so more testing and reports are needed and welcome), but generally things seem to work.
Some instructions are here. It points to my TMK fork, chibios branch (I'm trying to keep it up-to-date with TMK mainline); or you can use the official hasu's TMK from github, flabbergast-tmk_chibios branch; hasu's reviewing the changes, so it's generally a bit behind my fork.
Some instructions are here. It points to my TMK fork, chibios branch (I'm trying to keep it up-to-date with TMK mainline); or you can use the official hasu's TMK from github, flabbergast-tmk_chibios branch; hasu's reviewing the changes, so it's generally a bit behind my fork.
- awkwrdm3
- Location: United States
- Main keyboard: WASD
- Main mouse: g700
- Favorite switch: mx clear
- DT Pro Member: -
this is my first project using micro controllers like this... so i'm a bit noob... I did just order a 2.0 just in case lol. I'll give it a crack with the instructions you put together... thanks for the help
- flabbergast
- Location: Southampton, UK
- DT Pro Member: 0120
- Contact:
Yea, 2.0 is probably much better choice for the first project - the point is that it's already tested a lot, many more people can help, and so diagnosing whether a problem is in the hardware vs in the software is way easier.
-
- Location: Taiwan
- DT Pro Member: -
Is there any reason to use the Teensy 3.2 over the 2.0? From what I hear there doesn't seem to be much reason to choose the 3.2 over the 2.0... (I will be beginning my first keyboard build as well and really don't want to mess this up ) Thanks!
- flabbergast
- Location: Southampton, UK
- DT Pro Member: 0120
- Contact:
No there is not (unless you really need the extra pins that are on 3.2). The thing is that last year it was expensive to get 2.0 in Europe (low stock and high prices), compared to 3.x. (They're still priced almost the same here in the UK, with LC being quite a bit cheaper.)
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
Hardware-wise, the Teensy 3.2 does give you much more bang for the buck. More RAM, faster processor etc. On the other hand, there are well-tested firmware solutions with plenty of features for the Teensy 2.0 and Teensy++ 2.0, while the existing keyboard firmware for Teensy 3.2 is more bleeding edge and less feature-packed if they exist at all.
For your first keyboard build, with few experience in microcontroller programming, I would definitely go for the 2.0 generation. It has more than enough processing power for a keyboard controller. If you feel you want to do advanced stuff like really complicated memory-intensive keyboard macros, programming of RGB illumination effects, build a color display into your keyboard or things like that, and are willing to learn to program these features for yourself, then go ahead and use the version 3.x.
For your first keyboard build, with few experience in microcontroller programming, I would definitely go for the 2.0 generation. It has more than enough processing power for a keyboard controller. If you feel you want to do advanced stuff like really complicated memory-intensive keyboard macros, programming of RGB illumination effects, build a color display into your keyboard or things like that, and are willing to learn to program these features for yourself, then go ahead and use the version 3.x.
-
- Location: United Kingdom
- Main keyboard: Custom 65% (Gateron Blue-Gateron Black MODS)
- Main mouse: Logitech M235
- Favorite switch: Gateron Blue
- DT Pro Member: -
Agree with the guys stating use a 2.0 for a first project. I'll likely complete my build tomorrow but have spent hours getting my Arduino Pro Micro working, even then I have had to make sacrifices due to pin shortage and had a number of minor issues with what appears to be AVR running under W10.
I looked at using my Teensy 3.0 but ran into some issues early on, I'll save that one for later this month.
Likely should have waited for my 2.0++ to arrive
I'll post some brief destructions soon for anyone wanting to use an Arduino Pro Micro (or derivative) from a Windows box.
I looked at using my Teensy 3.0 but ran into some issues early on, I'll save that one for later this month.
Likely should have waited for my 2.0++ to arrive
I'll post some brief destructions soon for anyone wanting to use an Arduino Pro Micro (or derivative) from a Windows box.
- awkwrdm3
- Location: United States
- Main keyboard: WASD
- Main mouse: g700
- Favorite switch: mx clear
- DT Pro Member: -
So i got me 2.0... and i'll save the 3.2 for later... I edited all the code i needed to but i got this error when i went to make my file.... any ideas of what the problem is?
Code: Select all
##-iMac:~ ##$ /Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile ; exit;
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 42: TARGET: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 45: TMK_DIR: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 48: TARGET_DIR: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 51: SRC: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 55: ifdef: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 56: KEYMAP: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 56: SRC: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 56: SRC: command not found
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 57: syntax error near unexpected token `else'
/Users/##/Desktop/tmk_keyboard-master/keyboard/gh60/Makefile: line 57: `else'
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
- Halvar
- Location: Baden, DE
- Main keyboard: IBM Model M SSK / Filco MT 2
- Favorite switch: Beam & buckling spring, Monterey, MX Brown
- DT Pro Member: 0051
Looks like your make command doesn't understand some of the Makefile. Could you share some details about the OS and software setup you're running this on?
-
- Main keyboard: poker 3
- Main mouse: logitech g602
- Favorite switch: cherry black
- DT Pro Member: -
I too am having many problems compiling firmware.
my config.h
my keymap_common.h
my matrix.c
my keymap_poker.c
any help would be appreciated. thanks!
my config.h
Spoiler:
my keymap_common.h
Spoiler:
Spoiler:
Spoiler:
any help would be appreciated. thanks!
-
- Location: France
- DT Pro Member: -
Well, without the exact error messages it's hard to help.
And, if you look at messages, always look at the first and solve it, the following ones usually are a consequence of the first.
Finally, you are using 17 columns, which is above 16 and may lead to problems, as explained here:
https://github.com/tmk/tmk_keyboard/wik ... -beyond-16
http://deskthority.net/workshop-f7/rebu ... ml#p146279
And, if you look at messages, always look at the first and solve it, the following ones usually are a consequence of the first.
Finally, you are using 17 columns, which is above 16 and may lead to problems, as explained here:
https://github.com/tmk/tmk_keyboard/wik ... -beyond-16
http://deskthority.net/workshop-f7/rebu ... ml#p146279
-
- Main keyboard: poker 3
- Main mouse: logitech g602
- Favorite switch: cherry black
- DT Pro Member: -
Ahh, thanks for that. I actually found even more syntax errors while updating my matrix file. I think I was just staring at the code for too long last night. I'll go over it again in a day or two when I have time and see what else I can find. If I still have problems I'll make sure to post a log from the terminal. Thanks for the help!
-
- Location: France
- Main keyboard: Corsair K70
- Main mouse: SteelSeries Sensei
- Favorite switch: MX Brown
- DT Pro Member: -
Hi guys,
I need your support and and tips in order to configure a Tensy 2.0 firmware.
- 1. As a French using a BÉPO layer, is better to proceed like this?
o I code for a QWERTY layout, adding:
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}
o Then I change layout in “Keyboards and Language” in Windows
- 2.a) Can I configure an key like this? (with 2 actions)
const uint16_t PROGMEM fn_actions[] =
{
[1] = ACTION_LAYER_MOMENTARY(1), /* active layer “1” */
[1] = ACTION_KEY(KC_RALT), /* “Alt Gr” key */
}
- 2.b) Or like this? (with “if” function)
const uint16_t PROGMEM fn_actions[] =
{
[2] = if (and{RALT=1;LSFT=0;RSFT=0})
then (–) /* “–” key */
else if (and{RALT=0;or(LSFT=1;RSFT=1)})
then ($) /* “$” key */
else if (and{RALT=1;or(LSFT=1;RSFT=1)})
then (NO) /* pointless key */
else (ACTION_KEY(ESC)) /* “Escape” key */
}
- Note: If you know other ways to get 2.a) and 2.b) results don’t hesitate
Thank you fou your attention,
Aenuriel
I need your support and and tips in order to configure a Tensy 2.0 firmware.
- 1. As a French using a BÉPO layer, is better to proceed like this?
o I code for a QWERTY layout, adding:
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}
o Then I change layout in “Keyboards and Language” in Windows
- 2.a) Can I configure an key like this? (with 2 actions)
const uint16_t PROGMEM fn_actions[] =
{
[1] = ACTION_LAYER_MOMENTARY(1), /* active layer “1” */
[1] = ACTION_KEY(KC_RALT), /* “Alt Gr” key */
}
- 2.b) Or like this? (with “if” function)
const uint16_t PROGMEM fn_actions[] =
{
[2] = if (and{RALT=1;LSFT=0;RSFT=0})
then (–) /* “–” key */
else if (and{RALT=0;or(LSFT=1;RSFT=1)})
then ($) /* “$” key */
else if (and{RALT=1;or(LSFT=1;RSFT=1)})
then (NO) /* pointless key */
else (ACTION_KEY(ESC)) /* “Escape” key */
}
- Note: If you know other ways to get 2.a) and 2.b) results don’t hesitate
Thank you fou your attention,
Aenuriel
- Ray
- Location: Germany
- Main mouse: touchpad
- DT Pro Member: -
I am not 100% sure, if I understood your questions correctly, but I try to answer anyways:
1) If you have a physical layout that is close to standard ISO or ANSI, it is easier to map a more or less standard layout in firmware and switch to BEPO in the OS. This way, you get the BEPO "shift-layer" for the number row and similar stuff for free.
2a) you want a key, that acts as ALT_GR but also switches to a different layer when pressed?
short answer is, you can't do it like you tried. You can do it with ACTION_FUNCTION.
2b) TMK isn't made for stuff like this, I think. You can get info about which mods are pressed though - iirc. So I guess you can do it with ACTION_FUNCTION(_TAP). You can do a lot of stuff with it. But you need to do some programming and also invest time into TMK to understand how you can do stuff.
Also fn_actions[] is restricted to 32 "keys". You might find this as a problem.
From your pseudocode, I guess you are not firm with C. You would need to invest a good amount of (probably frustrating) time to get anything to work with the 2) way. Instead make a regular layout in firmware and switch to a layout you like in the OS.
1) If you have a physical layout that is close to standard ISO or ANSI, it is easier to map a more or less standard layout in firmware and switch to BEPO in the OS. This way, you get the BEPO "shift-layer" for the number row and similar stuff for free.
2a) you want a key, that acts as ALT_GR but also switches to a different layer when pressed?
short answer is, you can't do it like you tried. You can do it with ACTION_FUNCTION.
2b) TMK isn't made for stuff like this, I think. You can get info about which mods are pressed though - iirc. So I guess you can do it with ACTION_FUNCTION(_TAP). You can do a lot of stuff with it. But you need to do some programming and also invest time into TMK to understand how you can do stuff.
Also fn_actions[] is restricted to 32 "keys". You might find this as a problem.
From your pseudocode, I guess you are not firm with C. You would need to invest a good amount of (probably frustrating) time to get anything to work with the 2) way. Instead make a regular layout in firmware and switch to a layout you like in the OS.
-
- Location: France
- Main keyboard: Corsair K70
- Main mouse: SteelSeries Sensei
- Favorite switch: MX Brown
- DT Pro Member: -
Thank you for your answer.
So, if I understand:
1. I was right.
2.a) I don't use this way.
2.b) I have to do it better. I changed the code for this:
const uint16_t PROGMEM fn_actions[] =
{
[2] = if (RALT=1;LSFT=0;RSFT=0) /* Alt Gr */
{ACTION_MODS_KEY(MOD_RALT , KC_GRV)} /* “–” key */
else if (RALT=0;LSFT=1;RSFT=0) /* L Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=0;LSFT=0;RSFT=1) /* R Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=0;LSFT=1;RSFT=1) /* L Shift + L Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=1;LSFT=1;RSFT=0) /* Alt Gr + L Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else if (RALT=1;LSFT=0;RSFT=1) /* Alt Gr + R Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else if (RALT=1;LSFT=1;RSFT=1) /* Alt Gr + L Shift + L Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else /* – */
{ACTION_KEY(KC_ESC)} /* “Escape” key */
}
I think this 2.b) is better now (if I can write an if/elseif/else function in the definition of Fn2) but I still have doubts with the "if (RALT=1;LSFT=0;RSFT=0)" parts.
So, if I understand:
1. I was right.
2.a) I don't use this way.
2.b) I have to do it better. I changed the code for this:
const uint16_t PROGMEM fn_actions[] =
{
[2] = if (RALT=1;LSFT=0;RSFT=0) /* Alt Gr */
{ACTION_MODS_KEY(MOD_RALT , KC_GRV)} /* “–” key */
else if (RALT=0;LSFT=1;RSFT=0) /* L Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=0;LSFT=0;RSFT=1) /* R Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=0;LSFT=1;RSFT=1) /* L Shift + L Shift */
{ACTION_KEY(KC_GRV)} /* “$” key */
else if (RALT=1;LSFT=1;RSFT=0) /* Alt Gr + L Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else if (RALT=1;LSFT=0;RSFT=1) /* Alt Gr + R Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else if (RALT=1;LSFT=1;RSFT=1) /* Alt Gr + L Shift + L Shift */
{ACTION_KEY(KC_NO)} /* pointless key */
else /* – */
{ACTION_KEY(KC_ESC)} /* “Escape” key */
}
I think this 2.b) is better now (if I can write an if/elseif/else function in the definition of Fn2) but I still have doubts with the "if (RALT=1;LSFT=0;RSFT=0)" parts.
-
- Location: France
- DT Pro Member: -
No you can't, you should use an ACTION_FUNCTION with your own implementation of the callback
Have a look at the following page, section 2.4:
https://github.com/tmk/tmk_keyboard/blo ... /keymap.md
You'll find some sample code at the end of this file:
https://github.com/tmk/tmk_keyboard/blo ... map_hasu.c
Code: Select all
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
Have a look at the following page, section 2.4:
https://github.com/tmk/tmk_keyboard/blo ... /keymap.md
You'll find some sample code at the end of this file:
https://github.com/tmk/tmk_keyboard/blo ... map_hasu.c
-
- Location: France
- Main keyboard: Corsair K70
- Main mouse: SteelSeries Sensei
- Favorite switch: MX Brown
- DT Pro Member: -
Hi again,
Can a macro definition like this work?
/* Macro definition */
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case DEL_INS :
/*
* NOTHING => DEL
* RALT => INS
*/
if (Keyboard.IsKeyDown(Key.RightAlt)) {
ACTION_KEY(KC_INS)
} else {
ACTION_KEY(KC_DEL)
}
break;
}
}
Can a macro definition like this work?
/* Macro definition */
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{
switch (id) {
case DEL_INS :
/*
* NOTHING => DEL
* RALT => INS
*/
if (Keyboard.IsKeyDown(Key.RightAlt)) {
ACTION_KEY(KC_INS)
} else {
ACTION_KEY(KC_DEL)
}
break;
}
}
-
- Main keyboard: poker 3
- Main mouse: logitech g602
- Favorite switch: cherry black
- DT Pro Member: -
I figured it out! Typing this on a fresh handwired TKL build around the stainless plates from wafflepc's groupbuy. Stay tuned on that thread for an update in a few days! And thanks for the heads up about the 17 column workaround obones!
-
- Location: Centreville, VA
- Main keyboard: GON NerD 60
- Main mouse: Microsoft Intellimouse 3.0 Legends Edition
- Favorite switch: Cherry MX Black
- DT Pro Member: -
I am building a hand wired numpad using a teensy 2.0. I was told that I could just use the lightpad TMK firmware if I just wired everything to the same pins. From what I understand, columns 0, 1, 2, and 3 are on pins PF0, PF1, PC7, and PC6 respectively, and rows 0, 1, 2, 3, 4, and 5 are on pins D0, D1, D2, D3, D5, and B7 respectively. Is that correct? Also, I am supposed to put the diodes on the rows not the columns correct?