IRC #olimex 2019-05-21

[02:05:55] **************** Logging Ended ****************
[02:12:34] **************** Logging Started ****************
[10:25:26] <leon-anavi> hi
[10:25:35] <jo0nas> hi
[10:50:41] <xcko> So I've been able to swap caps and escape and make the right menu key another super key by editing https://github.com/A64-TERES/TERES-KBD-RELEASE/blob/master/TERES-HID/KeyboardMouse.h and reflashing the keyboard, but I can't swap ctrl and alt
[10:51:25] <xcko> it seems that there is extra code in https://github.com/A64-TERES/TERES-KBD-RELEASE/blob/master/TERES-HID/KeyboardMouse.c for the control keys specifically, but not the alt keys
[10:53:31] <xcko> If I change the alt and ctrl keys in KeyboardMouse.h like I've done with caps/esc menu/super and reflash, I end up with the alt keys being ctrl keys and the ctrl keys being ctrl. I'm guessing that's due to the extra code for the ctrl keys in KeyboardMouse.c
[10:56:07] <xcko> It's tricky to read, but if anyone knows or can figure out what the code around line 447 to 460 in KeyboardMouse.c is doing, why it's there, why there is no parallel code for the alt keys, I'd appreciate it
[10:56:09] <diego71> xcko: probably, there is more kludge in that code, that I feel good code should have :)
[10:56:43] <xcko> diego71: it's impossible to read. I'm suspecting it might be autogenerated from a gui tool
[10:56:55] <diego71> xcko: not at all
[10:57:22] <diego71> I think is just started in sane away, and then pocked around until it works
[10:57:33] <diego71> *in a sane way
[10:58:53] <xcko> and it does work, so hats off to olimex for doing that. I was guessing a gui tool because some of the docs mention one
[10:59:31] <diego71> xcko: some of the original code come from usb library example
[11:00:18] <diego71> btw, sometime ago I forked the code to make more readable. You can find the link here: https://www.olimex.com/forum/index.php?topic=5954.15
[11:00:32] <diego71> I hope it help
[11:09:55] <xcko> ooo thanks I'll check that out
[11:12:33] <xcko> I was also curious why in the keym[] in the KeyboardMouse.h file that LEFTGUI comes before LEFTSHIFT, seems like it should be the otherway around according to the Keyboard.pdf file - did you come across that?
[11:21:55] <xcko> wow nice work, is it only the mouse = 0 line that disables the right mouse button? mine works fine so I don't need it disabled
[11:22:38] <xcko> http://git.trueelena.org/cgit.cgi/firmware/TERES-KBD/commit/TERES-HID?h=indent2&id=a0e455654fb92b0e6ea39bb101fea7dfbeba26c5
[11:52:00] <xcko> Excellent diego71 thank you! Everything works perfectly!
[11:52:11] <diego71> good :)
[11:58:43] <xcko> actually it seems the right control, which I've remapped with right alt, works perfectly in X, but not on the console. Pretty weird, idk if that's a firmware bug or something else
[11:59:30] <diego71> weird indeed, maybe it's the console that remap right alt to left alt
[12:02:04] <xcko> does the console normally remap keys? I swapped both left and right control and alt, the left side works as expected, the new right control works, only the new right alt is different
[12:10:12] <xcko> I think it was because right alt was being interpreted as altgr or something on the console. set my keymap to us and it works as expected. Not a firmware issue :)
[12:16:51] <diego71> xcko: also console do some remapping. The firmware just send a scan code that is related to his position, not to what is write on the key :)
[12:23:52] <xcko> Thanks for your help diego71 I really appreciate it
[12:24:13] <xcko> also, anyone start experimenting with the lima driver in the 5.0-rc1 kernel yet?
[12:32:52] <diego71> xcko: you didn't have to modify the keyboard firmware, in theory you can change the mapping from X for example, but I didn't want to spoil the fun :)
[12:34:42] <xcko> Oh yeah I know, I usually use xmodmap but it's pretty sweet not too :)
[12:37:30] <xcko> plus I don't have to deal with reapplying it after suspend, or when going to new OS's, or keeping a seperate keymap for the console etc
[16:10:49] <dddddd> xcko, about lima... you mean 5.2?
[16:13:51] <dddddd> What's supposed to work? I can try in a few days.