Author Topic: My Ergodox Layout  (Read 17262 times)

0 Members and 1 Guest are viewing this topic.

Offline jalli

  • Posts: 101
  • Location: Toronto, Canada
Re: My Ergodox Layout
« Reply #50 on: Tue, 05 November 2013, 10:42:31 »
I'm still waiting for my Ergodox, lets hope Massdrop gets the rest of the components soon and ship them.
I've played around with the tmk firmware a bit and it looks like this could all be implemented without much work.
I have not looked at the cases to much but I thought I'd be able to install the teensy in the left half by just swapping the middle layers and the components, for those that have already soldered everything it might be easier to create a little box with a teensy, usb in one side and i2c trrs out the other.
Ill post results when I have something to show.
Antonia

Offline tbc

  • Posts: 2366
Re: My Ergodox Layout
« Reply #51 on: Tue, 05 November 2013, 23:33:56 »
does a visual studio/windows sublime text-using web dev want to showoff their layout?

it's going to look ALOT different than a vim layout.
ALL zombros wanted:  dead or undead or dead-dead.

Offline frew

  • Thread Starter
  • Posts: 38
  • Location: dallas
    • blog
Re: My Ergodox Layout
« Reply #52 on: Fri, 15 November 2013, 23:39:56 »
As I see, my port of TMK was already mentioned in this thread, but I'd like to remind about it once more :)

It have all TMK features (NKRO, media keys, mouse keys, dual-role keys and so on), and also have support for layer indication and even for LeftLed's  ;D
(see http://geekhack.org/index.php?topic=22780.msg873819#msg873819 for more details)

All Ergodox-specific problems were successfully solved - big thanks to Ben and his firmware, which was used as working example.

Check it out here: https://github.com/cub-uanic/tmk_keyboard/tree/cub_layout
And here: http://geekhack.org/index.php?topic=48106.0

I have my own modification of "Workman for Programmers" for XOrg, optimized for Perl and Vim:
https://github.com/cub-uanic/tmk_keyboard/blob/cub_layout/keyboard/ergodox/addons/etc/layout/xkb/workman

And my layout were added to http://patorjk.com/keyboard-layout-analyzer/#/config
Try to analyze some real Perl code, for example from here:
https://raw.github.com/miyagawa/cpanminus/devel/lib/App/cpanminus/script.pm

Happy ErgoPerl-ing!  :thumb:

Oh man, thanks for posting in this thread!  I doubt I would have found it otherwise :)

I ported most of my layout (simple H/W vim emulation) to your firmware and after reading the other thread a bit and rebasing on your branch so I get the higher sampling or whatever it's called it's working great!

For others who might be interested, it's actually more stable than the original firmware.  I mentioned in another thread that I purchased a crappy usb hub and that when I plug random stuff in it actually causes the keyboard to crash and I have to unplug/replug it.  That problem is gone with this new firmware, so that's pretty great!

I'll post here again once I have my macros (multiple keystroke keys) ported and maybe some fun stuff like mouse/media keys.  In the meantime, this is where it's at if anyone cares: https://github.com/frioux/tmk_keyboard (just pasted with mouse instead of ~mod + p, need to fix that ASAP :D)

Offline frew

  • Thread Starter
  • Posts: 38
  • Location: dallas
    • blog
Re: My Ergodox Layout
« Reply #53 on: Fri, 15 November 2013, 23:44:52 »
Couldn't wait, already added yank and put.  To painful without it :)

Offline frew

  • Thread Starter
  • Posts: 38
  • Location: dallas
    • blog
Re: My Ergodox Layout
« Reply #54 on: Sat, 16 November 2013, 11:33:54 »
So I have been perusing the TMK code and especially the changes that cubuanic made in his layout.  I just discovered the gem that is tap keys!  I suspect I can leverage this to use less awkward keys for my layer switching.  So for example, because my keyboard emulates vim, I reach to the right to press the lower of the two big keys to the right of the TGB keys, and while holding that down hjkl become left down up right, respectively.  What I might consider doing is making Esc a tap key where if I tap it it layer switches.  Even if I can't do that for technical reasons I still think this is a pretty huge space saver.  So cool!  Thanks cubuanic and tmk! :D

Offline wuqe

  • Posts: 105
  • Location: WA, USA
Re: My Ergodox Layout
« Reply #55 on: Sat, 16 November 2013, 13:19:59 »
I also love the tap keys. The tap/momentary combo is convenient: I can hold a button for temporary number pad layer, or tap it twice to make it stay that way without pushing the button. Sweet!

Offline Pandora

  • Posts: 15
  • Location: Ontario, Canada
Re: My Ergodox Layout
« Reply #56 on: Fri, 07 February 2014, 12:23:29 »
I just got my ergodox and I'm trying to reprogram my layout. I've followed the instructions on their website, bt it isn't working. How do you access layers past 2 and if I change the original layer 0, how do I get those changes to take effect? I created a hex file but what do I do with it?
« Last Edit: Fri, 07 February 2014, 16:11:03 by Pandora »

Offline zorglups

  • Posts: 25
Re: My Ergodox Layout
« Reply #57 on: Tue, 07 October 2014, 05:52:15 »
Sure!  So with special keys like alt and ctrl you can't use PSTR.  Here's a commit that does something like what you want: https://github.com/frioux/ergodox-firmware/commit/90139f96d66e6808c147b21f3dd34aaa7ff261d9#firmware/keyboard/ergodox/layout/qwerty-kinesis-mod.c

So Alt + 0225 is really Alt+0 Alt + 2 Alt + 2 Alt + 5, which expands to this (I think):
(note that constants used for keys are in firmware/lib/usb/usage-page/keyboard.h)

void keys__press__m_u0225(void) {
    usb__kb__set_key(true, KEYBOARD__LeftAlt)   

    usb__kb__set_key(true, KEYBOARD__0_RightParenthesis);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__0_RightParenthesis);

    usb__kb__set_key(true, KEYBOARD__2_At);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__2_At);

    usb__kb__set_key(true, KEYBOARD__2_At);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__2_At);

    usb__kb__set_key(true, KEYBOARD__5_Percent);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__5_Percent);

    usb__kb__set_key(false, KEYBOARD__LeftAlt);
}
void R(m_u0225)(void) {}


Then in the layout you'd put m_u0225.  Let me know if this works, I'm interested.

Thank you Frew !!!
I used your code snippet to map ^X, ^C and ^V to some keys of my ergodox.

I added one "usb__kb__send_report();" to avoid a problem when my host OS (Win7) was remote connecting to another Windows host using Remote Desktop.
Without this additional "send_report", the remote host was printing "V" instead of pasting which is probably because he got the event wrongly sequenced somehow.

Here is my macros:
Code: [Select]
void keys__press__m_cut(void) { // Send a ^X
    usb__kb__set_key(true, KEYBOARD__LeftControl);
    usb__kb__send_report();
    usb__kb__set_key(true, KEYBOARD__x_X);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__x_X);
    usb__kb__set_key(false, KEYBOARD__LeftControl);
}
void R(m_cut)(void) {}

void keys__press__m_copy(void) { // Send a ^C
    usb__kb__set_key(true, KEYBOARD__LeftControl);
    usb__kb__send_report();
    usb__kb__set_key(true, KEYBOARD__c_C);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__c_C);
    usb__kb__set_key(false, KEYBOARD__LeftControl);
}
void R(m_copy)(void) {}

void keys__press__m_paste(void) { // Send a ^V
    usb__kb__set_key(true, KEYBOARD__LeftControl);
    usb__kb__send_report();
    //_delay_ms(333);
    usb__kb__set_key(true, KEYBOARD__v_V);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__v_V);
    usb__kb__set_key(false, KEYBOARD__LeftControl);
}
void R(m_paste)(void) {}

void keys__press__m_undo(void) { // Send a ^Z on an AZERTY keyboard
    usb__kb__set_key(true, KEYBOARD__LeftControl);
    usb__kb__send_report();
    usb__kb__set_key(true, KEYBOARD__w_W);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__w_W);
    usb__kb__set_key(false, KEYBOARD__LeftControl);
}
void R(m_undo)(void) {}

void keys__press__m_ctlA(void) { // Send a ^A on an AZERTY keyboard
    usb__kb__set_key(true, KEYBOARD__LeftControl);
    usb__kb__send_report();
    usb__kb__set_key(true, KEYBOARD__q_Q);
    usb__kb__send_report();
    usb__kb__set_key(false, KEYBOARD__q_Q);
    usb__kb__set_key(false, KEYBOARD__LeftControl);
}
void R(m_ctlA)(void) {}



Offline zorglups

  • Posts: 25
Re: My Ergodox Layout
« Reply #58 on: Thu, 09 October 2014, 03:13:30 »
Just my 2 cents:

1) Stability:
I tried TMK but had several cases where my modifiers keys were getting "sticky" (like when it seems you engaged a CTRL-LOCK). This may be due to a combination of autohotkey, TouchCursor running on my computer since they are having hooks on the keyboard but even with those disabled, the problem still happened. One thing I should say is that my Layer1 contains arrows under IJKL and ALT/CTRL/SHIFT under SDF. This make moving and selecting things a joy. I suspect that the combination of pushing temporarily a layer plus the modifier then the IJKL bugs in the TMK version I tried.
I never had such problem with the Ben's firmware.
I therefore came back to Ben's firmware and started with the partial-rewrite which cover pretty much my needs (especially the macros  :p).

2) Keys registered more than once:
I had sometimes keys being registered twice and that was pretty annoying.
I changed the following value from 5 to 15 in the firmware\keyboard\ergodox\options.h
Code: [Select]
#define  OPT__DEBOUNCE_TIME  15
// in milliseconds
Since then, I never had the problem.

Offline cub-uanic

  • Posts: 72
  • Location: Ukraine, Kharkov
Re: My Ergodox Layout
« Reply #59 on: Thu, 09 October 2014, 18:16:48 »
1) Stability:
I tried TMK but had several cases where my modifiers keys were getting "sticky" (like when it seems you engaged a CTRL-LOCK). This may be due to a combination of autohotkey, TouchCursor running on my computer since they are having hooks on the keyboard but even with those disabled, the problem still happened. One thing I should say is that my Layer1 contains arrows under IJKL and ALT/CTRL/SHIFT under SDF. This make moving and selecting things a joy. I suspect that the combination of pushing temporarily a layer plus the modifier then the IJKL bugs in the TMK version I tried.
I never had such problem with the Ben's firmware.
I therefore came back to Ben's firmware and started with the partial-rewrite which cover pretty much my needs (especially the macros  :p).

Which branch are you using for TMK?
I'd like to see source of your layout file, and try to reproduce this bug.
Thanks.

ErgoDox Classic - Stock Clears
Teenesis - Kinesis Advantage powered by Teensy