Author Topic: Easy AVR USB Keyboard Firmware and Keymapper  (Read 922475 times)

0 Members and 2 Guests are viewing this topic.

Offline ErgoMacros

  • Posts: 313
  • Location: SF Bay Area
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2300 on: Fri, 09 February 2018, 15:52:17 »
And the usage scenarios for this type of key combination seems (to me) to be limited as well.

kamilakas: You may have to dedicate one key for Alt, another for Tab (Like a "normal" keyboard.)

If I've misread your intent please let us know... maybe there's some other workable combo to achieve what you seek.

Today's quote: '...“but then the customer successfully broke that.”

Offline fattredd

  • Posts: 10
  • Location: 127.0.0.1
  • Way to go
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2301 on: Thu, 01 March 2018, 18:38:06 »
I'm having trouble with lockable/toggle fn keys on the Frosty Flake. Whenever I press a locked fn key, it acts in normal mode. Same thing for toggle mode.

Sent from my Nexus 6 using Tapatalk


Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2302 on: Thu, 01 March 2018, 19:38:58 »
I'm having trouble with lockable/toggle fn keys on the Frosty Flake. Whenever I press a locked fn key, it acts in normal mode. Same thing for toggle mode.

Sent from my Nexus 6 using Tapatalk

I haven't had mine out in a long time.  I can try the latest code to see if it works.  Are you able to send your config file?

Offline fattredd

  • Posts: 10
  • Location: 127.0.0.1
  • Way to go
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2303 on: Fri, 02 March 2018, 08:14:44 »
I'm having trouble with lockable/toggle fn keys on the Frosty Flake. Whenever I press a locked fn key, it acts in normal mode. Same thing for toggle mode.

Sent from my Nexus 6 using Tapatalk

I haven't had mine out in a long time.  I can try the latest code to see if it works.  Are you able to send your config file?

You bet. FN1 is the default layer as well for some reason, but that's fine by me.
* worklayout.dat

Edit: I should mention that I'm trying to lock FN4, which can be found on the prntscrn button.
« Last Edit: Tue, 06 March 2018, 06:31:32 by fattredd »

Offline fattredd

  • Posts: 10
  • Location: 127.0.0.1
  • Way to go
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2304 on: Thu, 08 March 2018, 07:15:12 »
Sorry to bump, but have you had a chance to check this out yet?

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2305 on: Thu, 08 March 2018, 10:02:50 »
Sorry to bump, but have you had a chance to check this out yet?

Yeah, sorry.  I haven't forgotten, I've just been very busy.  In addition to family requirements, EasyAVR is getting a major overhaul for version 3.0 and that has taken up a lot of my free programming time.  I'll look tonight.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2306 on: Thu, 08 March 2018, 19:56:29 »
I'm having trouble with lockable/toggle fn keys on the Frosty Flake. Whenever I press a locked fn key, it acts in normal mode. Same thing for toggle mode.

Sent from my Nexus 6 using Tapatalk

Okay I took out my Black Petal, which is very similar to a Frosty Flake.  I added a Toggle FN key to my map and it worked okay.  I added a Lockable FN and it worked okay.  I added the lockable FN to different FN layer and it still worked okay.  I can't seem to reproduce the issue.

When you say that it "acts in normal mode" what do you mean?  For example, a lockable FN key is almost identical to a normal FN key, except that it will "stick" if you double-press it.  Toggle is one press on, one press off.


Offline fattredd

  • Posts: 10
  • Location: 127.0.0.1
  • Way to go
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2307 on: Fri, 09 March 2018, 07:53:05 »
Thanks for your patience.

What I mean is that the FN layer is active when the FN key is pressed, but as soon as it's released I return to the default layer. Exactly like if I had set the mode to 'Normal'. The layer just doesn't stay on for whatever reason. This same thing happens with both 'Lockable' and 'Toggle' modes. Not really sure what's going on here, but I'll try to make a fresh layout and see if it still happens.

Offline fattredd

  • Posts: 10
  • Location: 127.0.0.1
  • Way to go
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2308 on: Fri, 09 March 2018, 08:37:22 »
Well I don't know what's going on with my other layout, but starting fresh layout made everything work flawlessly. Thanks for your time.

Offline whiteTail

  • Posts: 4
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2309 on: Sat, 10 March 2018, 18:30:15 »
Having a bit of trouble with the software running on my Mac. I'm running 10.13.3, with Python 3.6.4. I can get the latest version of EasyAVR to run, and I can set up my board layout using the GUI, complete with all the layers, etc., that I want. However, here's where I run into problems: When I go to save or build the layout, the options are all greyed out in the menu. I can't select anything, and so I'm just stuck. Once, I was able to save the layout, but then I couldn't build the layout. Now when I load the .dat file, the options are all immediately greyed out.

I do get the following message in my terminal window whenever I invoke the file chooser from the gui, but I'm not sure if it has anything to do with the bug I'm seeing:

Code: [Select]
objc[30220]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/FinderKit (0x11a67db68) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x112c65cd8). One of the two will be used. Which one is undefined.
Any help would be appreciated!

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2310 on: Sat, 10 March 2018, 18:35:27 »
Having a bit of trouble with the software running on my Mac. I'm running 10.13.3, with Python 3.6.4. I can get the latest version of EasyAVR to run, and I can set up my board layout using the GUI, complete with all the layers, etc., that I want. However, here's where I run into problems: When I go to save or build the layout, the options are all greyed out in the menu. I can't select anything, and so I'm just stuck. Once, I was able to save the layout, but then I couldn't build the layout. Now when I load the .dat file, the options are all immediately greyed out.

I do get the following message in my terminal window whenever I invoke the file chooser from the gui, but I'm not sure if it has anything to do with the bug I'm seeing:

Code: [Select]
objc[30220]: Class FIFinderSyncExtensionHost is implemented in both /System/Library/PrivateFrameworks/FinderKit.framework/FinderKit (0x11a67db68) and /System/Library/PrivateFrameworks/FileProvider.framework/OverrideBundles/FinderSyncCollaborationFileProviderOverride.bundle/Contents/MacOS/FinderSyncCollaborationFileProviderOverride (0x112c65cd8). One of the two will be used. Which one is undefined.
Any help would be appreciated!
Sounds like tkinter has problems on the mac.  I don't have a solution for you right now because I don't have any Macs ti test with and I don't know anything about them.

But I do have good news. I am rewriting the GUI from scratch using wxPython, which is much better. Work is already underway but it will take a while.

Do you have access to any windows boxes?

Offline whiteTail

  • Posts: 4
Mac issues
« Reply #2311 on: Sat, 10 March 2018, 18:39:31 »
But I do have good news. I am rewriting the GUI from scratch using wxPython, which is much better. Work is already underway but it will take a while.

Do you have access to any windows boxes?

Thanks for the quick response! I can bother a friend with Windows for a favor until your update is complete.

Offline jdcarpe

  • * Curator
  • Posts: 8852
  • Location: Odessa, TX
  • Live long, and prosper.
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2312 on: Sat, 10 March 2018, 18:55:33 »
I'm using a Mac, and I just tried it with the latest Python and the latest build of EasyAVR. Worked fine for me.

I am on 10.12.6 and not 10.13.3, so maybe that's why. I know they changed the file system for High Sierra, if that would affect it.
KMAC :: LZ-GH :: WASD CODE :: WASD v2 :: GH60 :: Alps64 :: JD45 :: IBM Model M :: IBM 4704 "Pingmaster"

http://jd40.info :: http://jd45.info


in memoriam

"When I was a kid, I used to take things apart and never put them back together."

Offline whiteTail

  • Posts: 4
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2313 on: Sun, 11 March 2018, 14:41:47 »
I'm using a Mac, and I just tried it with the latest Python and the latest build of EasyAVR. Worked fine for me.

I am on 10.12.6 and not 10.13.3, so maybe that's why. I know they changed the file system for High Sierra, if that would affect it.

That's interesting. I have an older Mac running 10.12 that I use as a media server. I'll try that one and hope for a different result. Thanks for the tip.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2314 on: Sun, 11 March 2018, 16:43:31 »
tkinter is just bad, i'm not surprised it can work or break from version to version.  That's why I'm switching to WX, because it uses the native windowing controls.

Here's a screenshot.  It's early stages but you can see how the various controls now match the Windows 10 theme.


Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2315 on: Sun, 11 March 2018, 17:04:50 »
Oh that looks very good. Do you have an ETA?
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2316 on: Sun, 11 March 2018, 19:41:45 »
Oh that looks very good. Do you have an ETA?

Probably weeks, if I'm being honest.  Unfortunately it's hard to find time for hobby programming, and in this case it's slow going because I'm learning wx at the same time.  Also this is more than just porting from tkinter to wxPython; It's a redesign to remove all the bad stuff that grew into it over the years.  New save file format, new macro mini-language, new UX concept, and so on.

It's being developed in the 3.0_dev branch on the Github repository.  When it's actually functional I'll begin committing the code, but it won't be truly usable until I release it.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2317 on: Wed, 14 March 2018, 17:21:06 »
You're not going crazy but I abused mod powers to remove today's inaccurate, potentially off-putting posts - in summary if you try and build a COSTAR sized matrix against the FULLSIZE firmware it doesn't work well.  If you flash it in Linux it goes even less well, but can be recovered by holding in the button when you plug the Teensy in then pressing the button to put it in flash mode.

Looking forward to seeing what the new version will bring!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2318 on: Wed, 14 March 2018, 19:37:54 »
You're not going crazy but I abused mod powers to remove today's inaccurate, potentially off-putting posts - in summary if you try and build a COSTAR sized matrix against the FULLSIZE firmware it doesn't work well.  If you flash it in Linux it goes even less well, but can be recovered by holding in the button when you plug the Teensy in then pressing the button to put it in flash mode.

Looking forward to seeing what the new version will bring!

I actually just added an issue for this to the 3.0 plan yesterday.  I need to add a bunch of sanity checks to the config loader.

The tool originally only loaded stuff that I had made and tested, so they were assumed to be perfect and it doesn't bother checking anything.  Like so many other parts of the keymapper, that code was adapted and extended until it started to fail.

So much to do...

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2319 on: Wed, 14 March 2018, 20:03:35 »
I don't envy you having to code consistency and limit checks within the config file as well as crosschecking to the firmware it's based on - it's probably more complicated than the actual load function!  Necessary when a simple typo can break everything though, it can happen to anyone even if they have read and understood everything.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2320 on: Fri, 16 March 2018, 07:43:25 »
I don't envy you having to code consistency and limit checks within the config file as well as crosschecking to the firmware it's based on - it's probably more complicated than the actual load function!  Necessary when a simple typo can break everything though, it can happen to anyone even if they have read and understood everything.

It's not so bad, I just need to make sure the number of rows and columns is consistent between all the properties of the hardware.

Slow progress, but I really like the way it looks.


Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2321 on: Fri, 16 March 2018, 07:52:53 »
Key geometry? That's an interesting one, what about mods where the same pads are used for 1.5, 1, 1.5 or three 1.25s?  Actually it's not greyed out and nor are the matix positions so maybe you can adjust everything in the editor?  That would be impressive, could have the GH60 right shift correct on a 'big FN' layout rather than being swapped.  Now with Alt Gr too for our European friends and their random symbols...

Looks great all round :thumb:

120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2322 on: Fri, 16 March 2018, 08:10:21 »
Key geometry?
I assume that's to create layouts on the fly without having to bother with the .py source.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2323 on: Fri, 16 March 2018, 08:14:06 »
Key geometry?
I assume that's to create layouts on the fly without having to bother with the .py source.

No, that is not possible at this time.  I need to re-implement the functionality I had first, before I get ambitious.  Those fields aren't grayed out, but they are read-only.  The property dialog is moveable, so the first three fields are there to (A) make it completely unambiguous which key the user is editing and (B) give the information needed to update config files.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2324 on: Fri, 16 March 2018, 08:17:30 »
Marvellous. I'm really looking forward to this version.

One minor thing: I supposed you want Alt, rather than AltGr, in your automods list, since AltGr is basically Ctrl+Alt.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2325 on: Fri, 16 March 2018, 08:29:36 »
Marvellous. I'm really looking forward to this version.

One minor thing: I supposed you want Alt, rather than AltGr, in your automods list, since AltGr is basically Ctrl+Alt.

It was originally Alt.  Then somebody submitted a pull request to change it R_Alt, because that matters on European keyboards.  I just don't like how R_Alt looks, so I changed it to AltGr to match the legend on the right alt key.  If it's confusing I'll change it.

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2326 on: Fri, 16 March 2018, 08:38:08 »
Marvellous. I'm really looking forward to this version.

One minor thing: I supposed you want Alt, rather than AltGr, in your automods list, since AltGr is basically Ctrl+Alt.

It was originally Alt.  Then somebody submitted a pull request to change it R_Alt, because that matters on European keyboards.  I just don't like how R_Alt looks, so I changed it to AltGr to match the legend on the right alt key.  If it's confusing I'll change it.
I guess it makes sense for ISO keyboards but ANSI users might find it confusing indeed.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2327 on: Fri, 16 March 2018, 08:40:16 »
Marvellous. I'm really looking forward to this version.

One minor thing: I supposed you want Alt, rather than AltGr, in your automods list, since AltGr is basically Ctrl+Alt.

It was originally Alt.  Then somebody submitted a pull request to change it R_Alt, because that matters on European keyboards.  I just don't like how R_Alt looks, so I changed it to AltGr to match the legend on the right alt key.  If it's confusing I'll change it.
I guess it makes sense for ISO keyboards but ANSI users might find it confusing indeed.

Yeah it's a tough call.  I'll either use AltGr, Alt (Gr), or Alt with a tooltip to explain it

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2328 on: Fri, 16 March 2018, 20:12:23 »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2329 on: Mon, 26 March 2018, 11:11:14 »
Well, it turns out running this new version on Linux can be challenging.  Python 3.6 and wxPython 4.0 are not available on anything but the most recent distros.  I backed down support to python 3.5 and got it running on my Ubuntu 16.04 VM.  It doesn't look as good as windows, but it looks better than the tkinter version.  I think the theme Xfce is using is a little drab.


Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2330 on: Mon, 26 March 2018, 11:59:33 »
Python 3.6 and wxPython 4.0 are not available on anything but the most recent distros.
Meaning that we can't even manually install latest versions?
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2331 on: Mon, 26 March 2018, 12:04:44 »
Python 3.6 and wxPython 4.0 are not available on anything but the most recent distros.
Meaning that we can't even manually install latest versions?

Sure you can, that's how I got it running.  I just mean that you can't easily do a "apt install" command to get what you need.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2332 on: Mon, 26 March 2018, 12:07:31 »
Python 3.6 and wxPython 4.0 are not available on anything but the most recent distros.
Meaning that we can't even manually install latest versions?
Of course you can, but this is supposed to be 'Easy' so using the package manager should be enough.


Looks good to me, it's up to people to make it look good for them - that's the fun of Linux!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2333 on: Mon, 26 March 2018, 12:12:52 »
Python 3.6 and wxPython 4.0 are not available on anything but the most recent distros.
Meaning that we can't even manually install latest versions?
Of course you can, but this is supposed to be 'Easy' so using the package manager should be enough.


Looks good to me, it's up to people to make it look good for them - that's the fun of Linux!


On my Ubuntu xenial (16.04) VM I had to do this:

Code: [Select]
sudo apt install python3 python3-pip
sudo apt install libwxgtk3.0
sudo apt install libsdl1.2debian
sudo pip3 install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 wxPython

Whereas on Ubuntu bionic (18.04), you should be able to just do this:

Code: [Select]
sudo apt install python3 python3-wxgtk4.0
So it's not bad.
« Last Edit: Mon, 26 March 2018, 12:33:54 by metalliqaz »

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2334 on: Mon, 26 March 2018, 14:09:41 »
I guess a Linux illiterate like me can manage that.
I hope to see a working version soon.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2335 on: Mon, 26 March 2018, 14:53:46 »
That bad version isn't that bad but the new one is better :thumb:

I'm looking forward to trying out the new version too, doesn't look far off.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2336 on: Mon, 26 March 2018, 16:02:10 »
That bad version isn't that bad but the new one is better :thumb:

I'm looking forward to trying out the new version too, doesn't look far off.
I have dozens of TODOs left, but the main functions are implemented, except for the new board wizard.

I uses entirely new data structures but it is able to open legacy save files and convert them.

Does anyone have a 4k screen? I don't have any way to test UI scaling for high DPI screens.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2337 on: Sun, 01 April 2018, 20:44:17 »
This wizard was such a pain to create, but it's working.



I think I will commit what I have tonight.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2338 on: Mon, 02 April 2018, 04:04:28 »
Got excited for a moment but no commit to play with - maybe tonight?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline mech0nly

  • Posts: 197
  • Location: ID
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2339 on: Mon, 02 April 2018, 04:45:15 »
This wizard was such a pain to create, but it's working.

Show Image


I think I will commit what I have tonight.

my gosh... finally
thank you very much for your hardwork ;)

probably i'll add KMAC Mini support when I got the board.
356CL DGE | 356mini | 360C | G81-3000SAT | G81-3000SAU | G81-3077SAU | ESA-3000-HASRO | G80-3000LPCXY-2 | G80-3485LWNUS-2 | 55g HHKB

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2340 on: Mon, 02 April 2018, 07:17:51 »
Got excited for a moment but no commit to play with - maybe tonight?
I did, but it's in a branch for now.

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2341 on: Mon, 02 April 2018, 07:20:27 »
This wizard was such a pain to create, but it's working.

Show Image


I think I will commit what I have tonight.

my gosh... finally
thank you very much for your hardwork ;)

probably i'll add KMAC Mini support when I got the board.
Easiest way to do that is probably to copy and mod the KMAC config directly. IIRC the hardware is almost identical, just a different layout shape.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2342 on: Mon, 02 April 2018, 07:20:51 »
That's too clever for me first thing in the morning :))

Will have a play in a bit!
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2343 on: Mon, 02 April 2018, 07:23:07 »
That's too clever for me first thing in the morning :))

Will have a play in a bit!
I will make alpha and beta releases with it for a while before replacing the existing version. They will be zip files so git isn't required

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2344 on: Mon, 02 April 2018, 21:44:49 »
3.0.0 beta release: https://github.com/dhowland/EasyAVR/releases/tag/v3.00.00-beta.1

Same old executable in zip file as before for Windows users.
Python package provided for Linux users (pip3 install easykeymap-3.0.0.tar.gz)

This code is entirely untested.  This is EARLY beta.  Just assume it's broken so you won't be disappointed.

It now saves keymaps as JSON files, but it can still open the old save files.  Just tell it to show .dat files in the Open dialog.
« Last Edit: Mon, 02 April 2018, 21:46:44 by metalliqaz »

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2345 on: Wed, 04 April 2018, 07:45:00 »
I played around v3beta for a bit and I'm liking it a lot, especially how every key gets its own pop up menu and how the scandcode picker is now summoned.
I compiled the same source in both v3beta and v2.05.11 and I'm getting a slightly smaller output from the former which must be either some sort of code optimization or Python v3 (I know little about programming so I'm guessing) either way it's very nice.

I got an error while loading a custom layout that had SCANCODE_FN in it so I'm guessing it's being dropped in favour of SCANCODE_FN0 since replacing it fixed the issue and made the firmware working as intended.
Perhaps having both should be considered to support legacy configurations.
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2346 on: Wed, 04 April 2018, 07:51:05 »
I played around v3beta for a bit and I'm liking it a lot, especially how every key gets its own pop up menu and how the scandcode picker is now summoned.
I compiled the same source in both v3beta and v2.05.11 and I'm getting a slightly smaller output from the former which must be either some sort of code optimization or Python v3 (I know little about programming so I'm guessing) either way it's very nice.

I got an error while loading a custom layout that had SCANCODE_FN in it so I'm guessing it's being dropped in favour of SCANCODE_FN0 since replacing it fixed the issue and made the firmware working as intended.
Perhaps having both should be considered to support legacy configurations.
Thanks for testing it!

There should already be a function that fixes the SCANCODE_FN issue. I'll have to check why it isn't working...  By the way, FN Became FN1.  FN0 is entirely new.
« Last Edit: Wed, 04 April 2018, 08:08:37 by metalliqaz »

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2347 on: Wed, 04 April 2018, 08:19:13 »
I played around v3beta for a bit and I'm liking it a lot, especially how every key gets its own pop up menu and how the scandcode picker is now summoned.
I compiled the same source in both v3beta and v2.05.11 and I'm getting a slightly smaller output from the former which must be either some sort of code optimization or Python v3 (I know little about programming so I'm guessing) either way it's very nice.

I got an error while loading a custom layout that had SCANCODE_FN in it so I'm guessing it's being dropped in favour of SCANCODE_FN0 since replacing it fixed the issue and made the firmware working as intended.
Perhaps having both should be considered to support legacy configurations.

I just loaded an old save file and it correctly fixed all the FN -> FN1 keys.  What was the error?

Offline TalkingTree

  • Posts: 2452
  • Location: Italy (142)
    • My projects
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2348 on: Wed, 04 April 2018, 08:51:45 »
What was the error?

193064-0

For reference, this was the code.

Code: [Select]
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2013-2016 David Howland
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program.  If not, see <http://www.gnu.org/licenses/>.

"""Keyboard definition for the XMMX keyboard"""

# The first decision you have to make is to choose a hardware
# layout.  Assuming you are using a Teensy2.0, ATmega32U4_16MHz_TKL
# is probably the best hardware layout for you.  ATmega32U4_16MHz_SIXTY
# might also work for you, though.  The sizes are defined in the
# templates/__init__.py file of the keymapper.
# Leave the rest of the imports like they are here.
import easykeymap.templates.ATmega32U4_16MHz_TKL as firmware
from easykeymap.ioports import *
from easykeymap.helper import make_matrix_config

# The name of the board in the "New" dialog
description = "XMMX"
# Unique string to identify THIS exact hardware layout
unique_id = "xmmx"
# The name of the .cfg file the system will try to find for altered
# layout options.  See the configs subdir of the keymapper.
cfg_name = "xmmx"

# Hand-wired boards usually use Teensy controllers.  Set this to
# True to make sure that the bootloader works.
teensy = False
# If your board has an exposed switch for going into the bootloader,
# you can set this to True and the system won't prompt you to add a
# BOOT key to your layout.
hw_boot_key = False

# These two parameters define the size of the keyboard in the display.
# Must be whole numbers in units of quarter key lengths.  A TKL
# usually is 6 rows high with a 1/2 key length gutter under the Fn row.
# Therefore int(6.5*4).  Apply the same logic the width.  Remember
# we are talking visual width, not number of columns.
display_height = int(6.5*4)
display_width = int(18.25*4)

# The number of rows and columns in the matrix.  In a hand-wired board
# each of these will correspond to a single pin.
num_rows = 6
num_cols = 17

# Keyboards work by scanning a matrix to check each key.  The scan
# works by setting an active row/column (strobing) and then reading
# the status of every switch that crosses it (sensing).
# strobe_cols tells the firmware which direction you have your diodes
# installed.  If diodes go from column to row, then strobe_cols must
# be False.  If diodes go from row to column, then strobe_cols must be
# True.
strobe_cols = False
# strobe_low tells the firmware if a row/column should be activated
# by pulling the pin high or low.  Hand-wired boards will almost always
# use strobe_low = True
strobe_low = True

# The matrix_hardware, matrix_strobe, matrix_sense parameters tell
# the firmware how to initialize the ports, what pins must be set
# for each row/column, and what order to strobe/sense.  These are
# complicated and are explained fully elsewhere.  It is easiest to
# configure the matrix by using the make_matrix_config function as
# shown below.  Just customize 'rows' and 'cols' for your project.
matrix_hardware, matrix_strobe, matrix_sense = make_matrix_config(
    strobe_cols=strobe_cols,
    strobe_low=strobe_low,
    rows=[B0, F6, F5, F4, F1, F0],
    cols=[B3, B2, B1, E6, B7, C7, C6, D4, D6, D7, B4, D0, D1, F7, D2, D3, D5],
    device=firmware.device
)

# The total number of LED outputs (indicators + backlights)
num_leds = 2
# The number of LED indicators (for example, caps lock)
num_ind = 2
# The number of backlight enable modes.  This counts the number of
# options available for the BL_ENABLE key.  Boards without backlights
# should use the minimum value of 2.
num_bl_enab = 2

# Define the default assignments of the indicator LEDs.  The length
# of this list must equal num_ind.  For each LED, the first string
# is the description of the key shown in the GUI.  The second string
# is the default function assigned to that LED.  LED functions must
# be strings as defined in led_assignments of gui.py.  Common choices
# are 'Num Lock', 'Caps Lock', 'Scroll Lock', 'Win Lock', 'Fn Active',
# 'Recording', 'Backlight', and 'Unassigned'.
led_definition = [
    ('LED1', 'Caps Lock'),
    ('LED2', 'Scroll Lock')
]

# Definition of LED pins.  (indicators and backlights)  Indicators
# must come first and be in the same order as defined in led_definition.
# LED_DRIVER_PULLUP is used when the pin is connected to the anode of
# the LED and the cathode is connected to ground.
# LED_DRIVER_PULLDOWN is used when the pin is connected to the cathode
# of the LED and the anode is connected to the power supply.
led_hardware = [
#       Port    Pin    Direction
    ( REF_PORTB, 6, LED_DRIVER_PULLDOWN ),
    ( REF_PORTB, 5, LED_DRIVER_PULLDOWN )
]

# True if the board supports backlight, otherwise False
backlighting = False

# This can be used to configure different backlighting zones.  Explained
# in more detail elsewhere.  Length of list must equal num_bl_enab.
# Length of each tuple must equal num_leds.  Tuples use the same ordering
# as led_hardware.  Almost everyone should just use an all-on/all-off
# configuration.  That's a list of two tuples, one with all 1s for each
# LED, the other with all 0s for each LED.
bl_modes = [
    ( 0, 0 ),
    ( 1, 1 )
]

# Just leave this here as-is.
KMAC_key = None

# Define your layout.  This is a list of rows.  Each row is a list
# of keys.  Each key is a tuple of three items.  First item is a tuple
# defining the width,height of the key.  If it is just a number, it
# will be a space instead of a key.  All units are in quarter key lengths,
# so a standard key would be (4,4).  Second item is a tuple defining the
# row,column in the matrix for that key.  Third item is the default scancode
# for that key, from scancodes.py.  If a row is a number instead of a list,
# it will just make a vertical spacer.
keyboard_definition = [
    [((4, 4), (0, 0), 'HID_KEYBOARD_SC_ESCAPE'),
     (4, None, '0'),
     ((4, 4), (0, 1), 'HID_KEYBOARD_SC_F1'),
     ((4, 4), (0, 2), 'HID_KEYBOARD_SC_F2'),
     ((4, 4), (0, 3), 'HID_KEYBOARD_SC_F3'),
     ((4, 4), (0, 4), 'HID_KEYBOARD_SC_F4'),
     (2, None, '0'),
     ((4, 4), (0, 5), 'HID_KEYBOARD_SC_F5'),
     ((4, 4), (0, 6), 'HID_KEYBOARD_SC_F6'),
     ((4, 4), (0, 7), 'HID_KEYBOARD_SC_F7'),
     ((4, 4), (0, 8), 'HID_KEYBOARD_SC_F8'),
     (2, None, '0'),
     ((4, 4), (0, 9), 'HID_KEYBOARD_SC_F9'),
     ((4, 4), (0, 10), 'HID_KEYBOARD_SC_F10'),
     ((4, 4), (0, 11), 'HID_KEYBOARD_SC_F11'),
     ((4, 4), (0, 12), 'HID_KEYBOARD_SC_F12'),
     (1, None, '0'),
     ((4, 4), (0, 14), 'HID_KEYBOARD_SC_PRINT_SCREEN'),
     ((4, 4), (0, 15), 'HID_KEYBOARD_SC_SCROLL_LOCK'),
     ((4, 4), (0, 16), 'HID_KEYBOARD_SC_PAUSE')],

    2,

    [((4, 4), (1, 0), 'HID_KEYBOARD_SC_GRAVE_ACCENT_AND_TILDE'),
     ((4, 4), (1, 1), 'HID_KEYBOARD_SC_1_AND_EXCLAMATION'),
     ((4, 4), (1, 2), 'HID_KEYBOARD_SC_2_AND_AT'),
     ((4, 4), (1, 3), 'HID_KEYBOARD_SC_3_AND_HASHMARK'),
     ((4, 4), (1, 4), 'HID_KEYBOARD_SC_4_AND_DOLLAR'),
     ((4, 4), (1, 5), 'HID_KEYBOARD_SC_5_AND_PERCENTAGE'),
     ((4, 4), (1, 6), 'HID_KEYBOARD_SC_6_AND_CARET'),
     ((4, 4), (1, 7), 'HID_KEYBOARD_SC_7_AND_AND_AMPERSAND'),
     ((4, 4), (1, 8), 'HID_KEYBOARD_SC_8_AND_ASTERISK'),
     ((4, 4), (1, 9), 'HID_KEYBOARD_SC_9_AND_OPENING_PARENTHESIS'),
     ((4, 4), (1, 10), 'HID_KEYBOARD_SC_0_AND_CLOSING_PARENTHESIS'),
     ((4, 4), (1, 11), 'HID_KEYBOARD_SC_MINUS_AND_UNDERSCORE'),
     ((4, 4), (1, 12), 'HID_KEYBOARD_SC_EQUAL_AND_PLUS'),
     ((4, 4), (1, 13), 'HID_KEYBOARD_SC_BACKSPACE'),
     ((4, 4), (0, 13), 'HID_KEYBOARD_SC_BACKSPACE'),
     (1, None, '0'),
     ((4, 4), (1, 14), 'HID_KEYBOARD_SC_INSERT'),
     ((4, 4), (1, 15), 'HID_KEYBOARD_SC_HOME'),
     ((4, 4), (1, 16), 'HID_KEYBOARD_SC_PAGE_UP')],

    [((6, 4), (2, 0), 'HID_KEYBOARD_SC_TAB'),
     ((4, 4), (2, 1), 'HID_KEYBOARD_SC_Q'),
     ((4, 4), (2, 2), 'HID_KEYBOARD_SC_W'),
     ((4, 4), (2, 3), 'HID_KEYBOARD_SC_E'),
     ((4, 4), (2, 4), 'HID_KEYBOARD_SC_R'),
     ((4, 4), (2, 5), 'HID_KEYBOARD_SC_T'),
     ((4, 4), (2, 6), 'HID_KEYBOARD_SC_Y'),
     ((4, 4), (2, 7), 'HID_KEYBOARD_SC_U'),
     ((4, 4), (2, 8), 'HID_KEYBOARD_SC_I'),
     ((4, 4), (2, 9), 'HID_KEYBOARD_SC_O'),
     ((4, 4), (2, 10), 'HID_KEYBOARD_SC_P'),
     ((4, 4), (2, 11), 'HID_KEYBOARD_SC_OPENING_BRACKET_AND_OPENING_BRACE'),
     ((4, 4), (2, 12), 'HID_KEYBOARD_SC_CLOSING_BRACKET_AND_CLOSING_BRACE'),
     ((6, 4), (2, 13), 'HID_KEYBOARD_SC_BACKSLASH_AND_PIPE'),
     (1, None, '0'),
     ((4, 4), (2, 14), 'HID_KEYBOARD_SC_DELETE'),
     ((4, 4), (2, 15), 'HID_KEYBOARD_SC_END'),
     ((4, 4), (2, 16), 'HID_KEYBOARD_SC_PAGE_DOWN')],

    [((7, 4), (3, 0), 'HID_KEYBOARD_SC_CAPS_LOCK'),
     ((4, 4), (3, 1), 'HID_KEYBOARD_SC_A'),
     ((4, 4), (3, 2), 'HID_KEYBOARD_SC_S'),
     ((4, 4), (3, 3), 'HID_KEYBOARD_SC_D'),
     ((4, 4), (3, 4), 'HID_KEYBOARD_SC_F'),
     ((4, 4), (3, 5), 'HID_KEYBOARD_SC_G'),
     ((4, 4), (3, 6), 'HID_KEYBOARD_SC_H'),
     ((4, 4), (3, 7), 'HID_KEYBOARD_SC_J'),
     ((4, 4), (3, 8), 'HID_KEYBOARD_SC_K'),
     ((4, 4), (3, 9), 'HID_KEYBOARD_SC_L'),
     ((4, 4), (3, 10), 'HID_KEYBOARD_SC_SEMICOLON_AND_COLON'),
     ((4, 4), (3, 11), 'HID_KEYBOARD_SC_APOSTROPHE_AND_QUOTE'),
     ((4, 4), (3, 12), 'HID_KEYBOARD_SC_NON_US_HASHMARK_AND_TILDE'),
     ((5, 4), (3, 13), 'HID_KEYBOARD_SC_ENTER'),
     (1, None, '0'),
     ((4, 4), (3, 14), '0'),
     ((4, 4), (3, 15), '0'),
     ((4, 4), (3, 16), '0')],

    [((5, 4), (4, 0), 'HID_KEYBOARD_SC_LEFT_SHIFT'),
     ((4, 4), (4, 1), 'HID_KEYBOARD_SC_NON_US_BACKSLASH_AND_PIPE'),
     ((4, 4), (4, 2), 'HID_KEYBOARD_SC_Z'),
     ((4, 4), (4, 3), 'HID_KEYBOARD_SC_X'),
     ((4, 4), (4, 4), 'HID_KEYBOARD_SC_C'),
     ((4, 4), (4, 5), 'HID_KEYBOARD_SC_V'),
     ((4, 4), (4, 6), 'HID_KEYBOARD_SC_B'),
     ((4, 4), (4, 7), 'HID_KEYBOARD_SC_N'),
     ((4, 4), (4, 8), 'HID_KEYBOARD_SC_M'),
     ((4, 4), (4, 9), 'HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN'),
     ((4, 4), (4, 10), 'HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN'),
     ((4, 4), (4, 11), 'HID_KEYBOARD_SC_SLASH_AND_QUESTION_MARK'),
     ((7, 4), (4, 12), 'HID_KEYBOARD_SC_RIGHT_SHIFT'),
     ((4, 4), (4, 13), 'SCANCODE_FN'),
     (1, None, '0'),
     ((4, 4), (4, 14), '0'),
     ((4, 4), (4, 15), 'HID_KEYBOARD_SC_UP_ARROW'),
     ((4, 4), (4, 16), '0')],

    [((5, 4), (5, 0), 'HID_KEYBOARD_SC_LEFT_CONTROL'),
     ((5, 4), (5, 1), 'HID_KEYBOARD_SC_LEFT_GUI'),
     ((5, 4), (5, 2), 'HID_KEYBOARD_SC_LEFT_ALT'),
     ((25, 4), (5, 7), 'HID_KEYBOARD_SC_SPACE'),
     ((5, 4), (5, 10), 'HID_KEYBOARD_SC_RIGHT_ALT'),
     ((5, 4), (5, 11), 'HID_KEYBOARD_SC_RIGHT_GUI'),
     ((5, 4), (5, 12), 'HID_KEYBOARD_SC_APPLICATION'),
     ((5, 4), (5, 13), 'HID_KEYBOARD_SC_RIGHT_CONTROL'),
     (1, None, '0'),
     ((4, 4), (5, 14), 'HID_KEYBOARD_SC_LEFT_ARROW'),
     ((4, 4), (5, 15), 'HID_KEYBOARD_SC_DOWN_ARROW'),
     ((4, 4), (5, 16), 'HID_KEYBOARD_SC_RIGHT_ARROW')]
]

# Just leave this here as-is.
alt_layouts = {}
My opensource projects: GH80-3000, TOAD, XMMX. Classified: stuff

Offline metalliqaz

  • * Maker
  • Thread Starter
  • Posts: 4951
  • Location: the Making Stuff subforum
  • Leopold fanboy
Re: Easy AVR USB Keyboard Firmware and Keymapper
« Reply #2349 on: Wed, 04 April 2018, 09:39:04 »
What was the error?

(Attachment Link)


Ah, yes, thank you.  Now I understand.  I think this can be fixed.