cub-uanic / tmk_keyboard Goto Github PK
View Code? Open in Web Editor NEWThis project forked from tmk/tmk_keyboard
keyboard controller firmware for Atmel AVR USB family
This project forked from tmk/tmk_keyboard
keyboard controller firmware for Atmel AVR USB family
I've been trying to get this firmware working on my dox, but whenever I load it, the left half of the keyboard stops functioning. The keyboard is working fine with ben's standard firmware (no diode switch flipped or anything), so I don't think it's there's any hardware fault.
If I connect the keyboard with hid_listen
running, I see this message:
trying to reset mcp23018
left side not responding
repeated in a pretty rapid loop.
To get the OSX media next and media prev keys working
tmk#199
Running the command make -f Makefile.lufa dvorak
fails with make: *** No rule to make target 'dvorak'. Stop.
.
If KEYMAP=dvorak make -f Makefile.lufa
is the correct way to do it, then perhaps the Ergodox-FAQ.md file should be updated?
After a regular reboot, the keyboard does not response. Unplug and replug "solves" the problem.
System: Windows 10
Keyboard: Ergodox from Falbatech
I built this project successfully on Mac OS X Yosemite using the provided instructions. However, the LGUI and RGUI keys are never registered (regardless of where they are placed). All other keys function as expected. The keyboard was also tested on Linux and would not register LGUI and RGUI under this firmware.
On both the Mac and Linux machine, using Ben Blazak's stock Ergodox firmware (https://github.com/benblazak/ergodox-firmware) works fine including LGUI/RGUI.
If there's any other information or other files I can provide to be of assistance, I'd be happy to do so.
I think it would be a good idea to establish some sort of road map to limit duplication of work here. It would be good to get this fork to a state where it's easy for other contributors to help out.
Here's what I foresee as the priority of updates for the near future:
Makefile.lufa
default, rename to Makefile
, and recommend that that should be the one to use unless Makefile.pjrc
is something that is really neededtmk_core
as a submodule, and move the Ergodox specific files to the root of the projectdocs/
directory with the current FAQ file, or move to Wiki.README
with basic git and build instructions to make it much easier for newcomers to dive right inI'm open to suggestions for anything else we've missed here. I'm happy to split up the work with @marknsikora to sprint to get this list done.
In the documentation keycode.txt
there's a small mistake
KC_INSERT KC_INT 49 Keyboard Insert1
it's not KC_INT
but KC_INS
Tried building my keymap after an update. Builds fine. However when I try to load the built hex file in the Teensy app I get the following error.
00:11:33.327: Open File event
00:11:36.781: ihex: parse error line 1454
The tail of my hex reads as follows
:105AA000A30456042004FE03C503380351036A030C
:0E5AB0008303A303010203040506070809008F
:0200000400807A
:040374000000000085 //<--- complaints about this line.
:00000001FF
There is one ticket in QMK referring to a similar issue here. I doubt a similar fix can be applied here since the two makefile setups are different enough at this point.
Any ideas?
Fairly simple to reproduce using the default layout.
The light can be re-enabled by toggling the num lock twice
Review and re-work default un-named keymap.
Take best practices and most generic things from KEYMAP_CUB.
See #11 for more details.
I think I found a bug.
On French keyboards, pressing RALT is different from pressing LALT and there are some symbols/character you just can only get by pressing RALT.
For example:
RALT
+ 8
.|
") you have to press RALT
+ 6
.So I've tried to define a macro on the ergodox source and the macro didn't work.
It was: ACTION_MODS_KEY(MOD_RALT, KC_8)
Getting deeper in the code I found this: in keycode.h there's a bit-filter:
#define MOD_INDEX(code) ((code) & 0x07)
but this filter means there can be only 3 bits = from 000
to 111
= only 7 possible values (from 001
to 111
) whereas there are 8 modifiers (same file, in the code):
/* Modifiers */
KC_LCTRL = 0xE0,
KC_LSHIFT,
KC_LALT,
KC_LGUI,
KC_RCTRL,
KC_RSHIFT,
KC_RALT,
KC_RGUI,
so I've modified the code to:
#define MOD_INDEX(code) ((code) & 0x0F)
and now the following macro work like expected and dont ignore RALT, like this:
ACTION_MODS_KEY(MOD_RALT, KC_8)
May I ask you how I should say this + test to the developping team responsible for this, and how to test it/make sure there's no consequences?
Hi,
thank you very much for making your firmware for the ErgoDox available! I was only a user until recently, when I thought I had a bad switch in my keyboard. Long story short: The perceived latency until my terminal emulator shows a window on a largish screen makes me hold the keys until the auto repeat kicks in and a second terminal emulator is started. I've detailed it in an issue here: i3/i3#3306 (comment)
So, in the course of this odyssey, I've rewritten the debouncing code (which was not so great, it blocks the whole keyboard for ~8ms when a single key is pressed) and managed to increase the keyboard scan rate from ~370Hz to ~950Hz, tested with the scan latency measurement code.
I've published my forked code here: https://github.com/fd0/ergodox-tmk
If you're interested, we can try merging my changes back here. I just thought I give you a heads up and say thanks! :)
Hi!
I want to create my own mapping for the ergodox, of course. What is the best way to do that? At first I just edited keymap.c to my liking. But I guess that is a bad idea since I will get merge conlficts later on when I pull in changes from upstream.
So, I made my own keymap_linus.h
file. I also edited Makefile.lufa
and added this at the end:
linus: OPT_DEFS += -DKEYMAP_LINUS
linus: all
And also I had to include the file in keymap.c.
Is this the recommended way to do it?
Problem: Using my Ergodox on Arch Linux, the Ergodox will not wake the computer from suspend.
Attempted fix:
First "fix" caused it to always wake up instantly.
Ultimately ended up with the following diffs and it works great for me:
--- a/common/avr/suspend.c
+++ b/common/avr/suspend.c
@@ -59,6 +59,7 @@ static void power_down(uint8_t wdto)
#ifdef PROTOCOL_LUFA
if (USB_DeviceState == DEVICE_STATE_Configured) return;
#endif
+#ifndef NO_SUSPEND_POWER_DOWN
wdt_timeout = wdto;
// Watchdog Interrupt Mode
@@ -78,6 +79,7 @@ static void power_down(uint8_t wdto)
// Disable watchdog after sleep
wdt_disable();
+#endif
}
void suspend_power_down(void)
@@ -90,8 +92,10 @@ bool suspend_wakeup_condition(void)
matrix_power_up();
matrix_scan();
matrix_power_down();
- for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
- if (matrix_get_row(r)) return true;
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
+ for (uint8_t c = 0; c < MATRIX_COLS; c++) {
+ if (matrix_is_on(r,c)) { return true; }
+ }
}
return false;
}
When running make -f Makefile.pjrc
in tmk_keyboard/keyboard/ergodox
, I get the following error:
../../protocol/pjrc/main.c:63:13: error: too few arguments to function 'suspend_power_down'
suspend_power_down();
^
In file included from ../../protocol/pjrc/main.c:35:0:
../../common/suspend.h:9:6: note: declared here
void suspend_power_down(uint8_t timeout);
^
../../rules.mk:541: recipe for target 'obj_ergodox_pjrc/protocol/pjrc/main.o' failed
make: *** [obj_ergodox_pjrc/protocol/pjrc/main.o] Error 1
I've created the attached keymap_dvorak to replace the essentially empty tmk_keyboard-cub_layout/keyboard/ergodox/keymap_dvorak.h.
Hi!
When I have my ergodox connected and running this firmware my computer does not go to sleep. The screen turns black for a while and then suddenly it wakes up again.
Is this a known issue?
Apparently others are experiencing the same thing
https://geekhack.org/index.php?topic=48106.msg1244951#msg1244951
So this function should produce a ~ but it does not produce anything, however pressing the keys gives the desired output.
Any ideas how I can solve this or make a workaround?
There have been some massive improvements to tmk concerning hooks.
This makes it trivial to setup your own LED scheme directly from within your keymap. For example, I currently only use 4 layers, and rarely use caps, num or scroll lock. As a result I have the following in my keymap:
void show_layer_led(uint32_t layer)
{
ergodox_led_all_off();
switch (layer) {
case 1 << 1:
ergodox_right_led_1_on();
break;
case 1 << 2:
ergodox_right_led_2_on();
break;
case 1 << 3:
ergodox_right_led_3_on();
break;
case 1 << 4:
ergodox_right_led_2_on();
ergodox_right_led_3_on();
break;
default:
break;
}
}
void hook_layer_change(uint32_t layer_state)
{
switch (layer_state) {
case 1:
show_layer_led(default_layer_state);
break;
default:
show_layer_led(layer_state);
break;
}
}
void hook_default_layer_change(uint32_t layer_state)
{
show_layer_led(default_layer_state);
}
Taking full advantage of this would help clean up matrix.c
. I don't feel there is anything wrong with the current defaults in led.c
, so these could be sane defaults in case users do not want to customise this.
I'm using Ubuntu 14.04. and whenever I want to go to Standby, the machine powers down and then right back up again. When I unplug the keyboard the machine stays in standby mode. This is probably a tmk-wide issue, but I'm not shure about that.
I guess it’s an upstream problem but I’ll open an issue here first given I’ve forked from you and use your ErgoDox code :)
In this macro
MACRO( I(50), T(LCTRL), T(LCTRL), W(255), W(255), T(ENTER), END)
https://github.com/kaimi/tmk_keyboard/blob/1.0.1/keyboard/ergodox/keymap_neo.h#L402
only the ENTER is registered, both LTCTRL are silently omitted. XEV output:
KeyPress event, serial 32, synthetic NO, window 0x3a00001,
root 0xa2, subw 0x0, time 27317479, (-128,418), root:(559,457),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
" XmbLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x3a00001,
root 0xa2, subw 0x0, time 27317535, (-128,418), root:(559,457),
state 0x0, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
I tried seperate D(LCTRL), U(LCTRL) and even reducing the macro to just T(LTCRL), T(ENTER). Don’t work either.
Hi!
In the Massdrop config generator you can assign a key as [Teensy] which is the same as pushing on the bootloader button on the Teensy. I can't find anything about that on this project.
Is it possible to map a bootloader key with this firmware?
I just want to know whether I need to drill a hole in my case or not :)
How can I test if the LEDs are even working? How does the activation of LEDs work depending on the active layer?
Edit: I found the code that should activate the LEDs in matrix.c, I've modified it to count the layers binary using the left hand LEDs but they are not lighting up. They are not lighting up at boot either. How can I debug?
Using avr-gcc-7.3.0-1
and avr-libc 2.0.0-1
on Arch Linux .
When building the with make -f Makefile.lufa
:
obj_ergodox_lufa/ergodox.o: In function `ergodox_blink_all_leds':
./tmk_keyboard/keyboard/ergodox/ergodox.c:70: undefined reference to `ergodox_led_all_off'
./tmk_keyboard/keyboard/ergodox/ergodox.c:71: undefined reference to `ergodox_led_all_set'
./tmk_keyboard/keyboard/ergodox/ergodox.c:72: undefined reference to `ergodox_led_all_on'
./tmk_keyboard/keyboard/ergodox/ergodox.c:74: undefined reference to `ergodox_led_all_off'
obj_ergodox_lufa/led.o: In function `led_set':
./tmk_keyboard/keyboard/ergodox/led.c:31: undefined reference to `ergodox_right_led_1_on'
./tmk_keyboard/keyboard/ergodox/led.c:45: undefined reference to `ergodox_right_led_2_on'
./tmk_keyboard/keyboard/ergodox/led.c:52: undefined reference to `ergodox_right_led_3_on'
./tmk_keyboard/keyboard/ergodox/led.c:33: undefined reference to `ergodox_right_led_1_off'
./tmk_keyboard/keyboard/ergodox/led.c:47: undefined reference to `ergodox_right_led_2_off'
./tmk_keyboard/keyboard/ergodox/led.c:54: undefined reference to `ergodox_right_led_3_off'
collect2: error: ld returned 1 exit status
make: *** [../../tmk_core/rules.mk:545: ergodox_lufa.elf] Error 1
When in debug & matrix mode (Shift_L+Shift_R+D, Shift_L+Shift_R+X), if SW3:9 and SW4:7 are pressed simultaneously, keyboard starts behaving erroneously.
Upsteam is using the following to set keymaps, we should probably change to match
make -f Makefile.<variant> KEYMAP=<name>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.