seq66
seq66 copied to clipboard
change key map
HI, I'm french so I'm using an azerty keyboard. I edited seq66.ctrl to change key map for my keyboard but key map is overwritten back to qwerty on app close. I created a seq66azerty.ctrl file, same thing happens. Did I miss something?
thanks.
Man, AZERTY looks more complex than QWERTZ! That one just needs a change "z" to "y", "y" to "z", "Z" to "Y", and "Y" to "Z". So I'll leave it to you to get the correct AZERTY setup.
After you create (and copy to a backup area) your new qseq66-azerty.ctrl file, edit the qseq66.ctrl file:
[midi-control-file]
qseq66-azerty.ctrl
Now, if you have changed the default configuration names to seq66.rc, seq66.ctrl, etc., let me know so I can see if there's a bug there. The normal life cycle of the configuration files is:
0. They don't exist
1. Run qseq66 for the first time, and default versions are created.
2. Stop qseq66 and edit the files.
3. Run qseq66, and the new configuration(s) will be read in.
4. Verify the new configurations.
5. Exist qseq66, and all files (except the 'usr' file, normally) will
be rewritten, but the settings you made should be preserved.
Anyway, if you do figure this out, can you email or post your AZERTY 'ctrl' file so that I can include it in the 'data' directory and give you credit for it? Thanks for the report!
-------- Tripayou 04:06 Thu 22 Apr --------
HI, I'm french so I'm using an azerty keyboard. I edited seq66.ctrl to change key map for my keyboard but key map is overwritten back to qwerty on app close. I created a seq66azerty.ctrl file, same thing happens. Did I miss something?
thanks.
-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47
-- A boy gets to be a man when a man is needed. -- John Steinbeck
- Run qseq66 for the first time, and default versions are created.
- Stop qseq66 and edit the files.
- Run qseq66, and the new configuration(s) will be read in.
- Verify the new configurations
That exactly what I made, tested on Ubuntu 20.04 and Debian 10. Changes are ok on startup but when I close app and reopen it key map is qwerty. I need to verify my file before sending you because I only changed loop and mute control section to test, I need to verify automation control section.
I tried to assign automation keys for my keyboard, trying to respect default places as possible using this and I found issues:
- some keys doesn't work, for example BPM+ and BPM-: default
'
and;
are replaced in azerty by*
andù
, both doesn't work - auto-shift for group learn for top lign doesn't work, and if i try to assign pressing shift key it "shifts" in qwerty, see image for key
1!
replaced by&1
: - I assigned a mute group to key
a
, after that loop control mute/unmute by pressing key doesn't work, loop is mute frozen (keyboard and mouse) even after clear all mutes.
Changing keymap was working fine in gtk version of sequencer64 (never tried Qt version), if it can helps you.
Hope it helps thanks
I figured out the issue with your 'ctrl' file being overwritten, and fixed that issue. I modified the internal key-map (see libseq66/src/ctrl/keymap.cpp) to use key-names like "0xe9" for the extended keys that Qt does not yet define. I did not want to use the extended characters themselves because I think they will change if the user changes a code page. I also created a new 'ctrl' file, data/linux/qseq66-azerty.ctrl. You can find it if you "git checkout optimizing" (and do a complete full-clean and rebuild if you desire).
I also added a "keyboard-layout" option in the [midi-control-settings] section of that 'ctrl' file. If set to 'azerty', all it does (currently) is turn off the slot-shift (shift-lock) option when learning the keys, so you'll have to use the Shift key. Here's part of that section:
button-rows = 4
button-columns = 8
keyboard-layout = azerty
You can do a vimdiff to see what I changed in your 'ctrl' file.
I've done basic testing by applying the 'ctrl' file with my normal US keyboard layout, and it seems to work for loops and mute groups. Still have more testing to do with the FR layout ("setxbdmap fr"). Once I get it all tested and documented and you feel satisfied, I will make release 0.93.1.
Also found some other bugs while trekking through all this, so thank you even more for your report!
-------- Tripayou 07:01 Thu 22 Apr --------
I tried to assign automation keys for my keyboard, trying to respect default places as possible using this and I found issues:
- some keys doesn't work, for example BPM+ and BPM-: default
"
and;
are replaced in azerty by*
andù
, both doesn't work- auto-shift for group learn for top lign doesn't work, it auto-shift in qwerty, see image for key
1!
replaced by&1
:![]()
- I assigned a mute group to key
a
, after that loop control mute/unmute by pressing key doesn't work, loop is mute frozenChanging keymap was working fine in gtk version of sequencer64 (never tried Qt version), if it can helps you.
Hope it helps thanks
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-824868438
-- Excerpt from a conversation between a customer support person and a customer working for a well-known military-affiliated research lab:
Support: "You're not our only customer, you know." Customer: "But we're one of the few with tactical nuclear weapons."
Oh, I forgot my question. What do you use for the code-page? UTF-8, C, ....?
-------- Tripayou 07:01 Thu 22 Apr --------
I tried to assign automation keys for my keyboard, trying to respect default places as possible using this and I found issues:
- some keys doesn't work, for example BPM+ and BPM-: default
"
and;
are replaced in azerty by*
andù
, both doesn't work- auto-shift for group learn for top lign doesn't work, it auto-shift in qwerty, see image for key
1!
replaced by&1
:![]()
- I assigned a mute group to key
a
, after that loop control mute/unmute by pressing key doesn't work, loop is mute frozenChanging keymap was working fine in gtk version of sequencer64 (never tried Qt version), if it can helps you.
Hope it helps thanks
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-824868438
-- I'll pretend to trust you if you'll pretend to trust me.
Just tested, ctrl file key map is not overwritten anymore and group learn pressing shift key works, but some keys doesn't work in top line : é
(loop 4), è
(loop24) and _
(loop 28). Key symbol _
is displayed correctly, é
and è
are not, see image:
tested bpm keys and some extras but it doesn't work. I always have problem with "frozen" loop but not sure it comes from keyboard layout, do you want me to open a new issue with steps to reproduce?
What do you use for the code-page? UTF-8, C, ....?
I edit files with gedit or pluma and here is my locale:
$ locale
LANG=fr_FR.UTF-8
LANGUAGE=
LC_CTYPE="fr_FR.UTF-8"
LC_NUMERIC="fr_FR.UTF-8"
LC_TIME="fr_FR.UTF-8"
LC_COLLATE="fr_FR.UTF-8"
LC_MONETARY="fr_FR.UTF-8"
LC_MESSAGES="fr_FR.UTF-8"
LC_PAPER="fr_FR.UTF-8"
LC_NAME="fr_FR.UTF-8"
LC_ADDRESS="fr_FR.UTF-8"
LC_TELEPHONE="fr_FR.UTF-8"
LC_MEASUREMENT="fr_FR.UTF-8"
LC_IDENTIFICATION="fr_FR.UTF-8"
LC_ALL=
Thanks for the feedback. Some progress, anyway!
Now that I have your locale I can set that up and test with it. I think the problem is just that the wrong hex value is being used for some keys. I added some debug code to the live-grid and recorded the keystroke under fr and us layouts, but with the en_US.UTF-8 locale.
Will look into the BPM-up/dn issue too.
It would be great if you open a new issue with steps to reproduce. Thanx!
-------- Tripayou 05:47 Mon 26 Apr --------
Just tested, ctrl file key map is not overwritten anymore and group learn pressing shift key works, but some keys doesn't work in top line :
é
(loop 4),è
(loop24) and_
(loop 28). Key symbol_
is displayed correctly,é
andè
are not, see image:
tested bpm keys and some extras but it doesn't work. I always have problem with "frozen" loop but not sure it comes from keyboard layout, do you want me to open a new issue with steps to reproduce?
What do you use for the code-page? UTF-8, C, ....?
I edit files with gedit or pluma and here is my locale:
$ locale LANG=fr_FR.UTF-8 LANGUAGE= LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL=
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-826806976
--
I tested some AZERTY special keys with showkey and I found particularities. Maybe it's hard to find this without hardware keyboard. Some keys return 2 codes, on press and on release :
Symbol PCode RCode
² 0xc2 0xb2
é 0xc3 0xa9
è 0xc3 0xa8
ç 0xc3 0xa7
à 0xc3 0xa0
° 0xc2 0xb0
ù 0x3c 0xb9
§ 0xc2 0xa7
I modified my ctrl file with correct code for é
(loop 4) and è
(loop 24), it works for loop 4 but pressing è
mute/unmute loop 4 instead of 24. Tried to replace _
by Underscore
but it doesn't work.
Key ^
code 0x5e
needs to be pressed twice, don't know if yours 6/^ on QWERTZ/QWERTY do the same.
Maybe it will be impossible to assign...
Hope it helps
I've done some more work on issues #47 and #49 in the 'optimizing' branch. I still have a little bit of work to do, but.... I have modified the data/linux/qseq66-azerty.ctrl file so you can use the characters themselves rather than the hex codes as the name of the key.
Also, the "keyboard-layout = azerty" clause in the 'ctrl' file not only disables the automatic slot-shift feature, but also modifies some of the keys in the internal key-map we use to look up keystrokes. This currently disables the F4 and F8 keys, plus a few keypad keys. See keymap.cpp.
Anyway, will test more tomorrow and glady accept any more reports that you have. It's a fun ride, learning about the complex world of computer keyboard!
-------- Tripayou 02:03 Tue 27 Apr --------
I tested some AZERTY special keys with showkey and I found particularities. Maybe it's hard to find this without hardware keyboard. Some keys return 2 codes, on press and on release :
Symbol PCode RCode ² 0xc2 0xb2 é 0xc3 0xa9 è 0xc3 0xa8 ç 0xc3 0xa7 à 0xc3 0xa0 ° 0xc2 0xb0 ù 0x3c 0xb9 § 0xc2 0xa7
Key
^
code0x5e
needs to be pressed twice, don't know if yours 6/^ on QWERTZ/QWERTY do the same. Maybe it will be impossible to assign...-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-827444800
--
Just tested recent changes, AZERTY special characters doesn't work, pressing key has no effect and console displays:
Ordinal 0xffffffff call returned false
.
Underscore still doesn't work (really strange, why?) but no error displayed when pressing it.
I had issues when reducing and restoring window, some keys didn't work on restore (Space for start/pause or stop key) but clicking start or stop button solved this. Didn't notice this in my previous tests but I can't confirm this is a new issue due to your last changes. Console displays this kind of error with a different sequence number each time it occurs:
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 13418, resource id: 0, major code: 130 (Unknown), minor code: 3
It's a fun ride, learning about the complex world of computer keyboard!
I never imagined it would be so complex.
Still working on the special characters. Make sure you do a diff between your qseq66-azerty.ctrl file and the one in data/linux. Also, if you're game, you can go into qt5_helpers.hpp, look at the following lines:
// #if defined SEQ66_PLATFORM_DEBUG_TESTING #define SEQ66_KEY_TESTING /* affects qt5_helpers & qslivegrid */ // #endif
Comment out the two lines as shown and rebuild. That would show the results of the keys in the console (but not cause any actions). Then we can see if your hardware puts out different codes than mine for AZERTY. But, as I said, I know I still have a few things to track down still.
As for the other issue, unfortunately the live-frame can lose keyboard focus depending on where else you click. The work-around is to click a blank button; then Space, Esc, etc. should work. Not sure how to get around this issue.
-------- Tripayou 07:04 Thu 29 Apr --------
Just tested recent changes, AZERTY special characters doesn't work, pressing key has no effect and console displays:
Ordinal 0xffffffff call returned false
. Underscore still doesn't work (really strange, why?) but no error displayed when pressing it.I had issues when reducing and restoring window, some keys didn't work on restore (Space for start/pause or stop key) but clicking start or stop button solved this. Didn't noticed this in my previous tests but I can't confirm this is a new issue due to your last changes. Console displays this kind of error with a different sequence number each time it occurs:
qt.qpa.xcb: QXcbConnection: XCB error: 13 (BadGC), sequence: 13418, resource id: 0, major code: 130 (Unknown), minor code: 3
It's a fun ride, learning about the complex world of computer keyboard!
I never imagined it would be so complex.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-829265864
-- Meade's Maxim: Always remember that you are absolutely unique, just like everyone else.
Well, I got side-tracked by a show-stopper bug in JACK transport and back-porting the new c_trig_transpose SeqSpec to Seq64. Made some progress in the AZERTY keyboard and wanted to let you know: more progess! I am still having an issue with the underscore, not sure why. The "^" character is not the programmer's caret, but a "circumflex". I create names for the extended characters, like a_grave, c_cedilla, etc. which you can see in doc/control_keys.ods and in the newest version of data/linux/qseq66-azerty.ctrl.
Can you hack at it and report back the remaining issues and your thoughts on what is happening badly? Thanks! I need a break today! :-O
Oh, it's in the optimizing branch.
Found a bug affecting the underscore (and more). Also adding to the mappings to properly use the Shift and Alt-Gr keys for lookup. Won't be able to work on that until tonight, though.
I added more remapping of the internal key table for AZERTY to account for the modifier (Shift, Ctrl, Ctrl-Alt == Alt-Gr) changes between layouts. That seems to have fix every issue, though I won't feel confident about that until you get a chance to try it and report. Anyway, just checked the latest into the "optimizing" branch. Time to walk the dog!
Just tested, great progress!
I found only 3 keys not working (to be sure it really doesn't work I assigned them to start one by one):
- Super_2
- BS
- KP_.
Just need some tweaks for theses ones and you'll can close this issue and open a bottle of french wine :D
I figured out "KP-." (and a couple others), just had to change the modifier to match. The "BS" entry is actually only match by Ctrl-H. So in qseq66-azerty.ctrl, "BS" must be renamed "BkSpace", which gets the correct key.
The Super_2 is a puzzle, as it yields:
Event 0xb2 None '2' (the superscript) scan -x31 key 0xb2 ord 0xe4
which is found. I'm thinking maybe Linux's "setxkbmap fr" doesn't quite match the true French layout.
Anyway, haven't checked anything new yet; working on a nasty little issue with mutegroups. So consider this email to be merely a 'heads up'. Thanks for all your support!
-------- Tripayou 01:57 Tue 11 May --------
Just tested, great progress!
I found only 3 keys not working (to be sure it really doesn't work I assigned them to start one by one):
- Super_2
- BS
- KP_.
Just need some tweaks for theses ones and you'll can close this issue and open a bottle of french wine :D
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-838105299
--
I'm an idiot.. At least this [bug] took about 5 minutes to find.. We need to find some new terms to describe the rest of us mere mortals then. -- Craig Schlenter in response to Linus Torvalds's
Tested your last commit, BkSpace is working fine. The two others are assigned to shortcuts that are not needed for playing live so you can consider them as low priority. Obviously I'll be there for testing when you'll fix it.
Can you run Seq66 with the --verbose option and copy/paste the event messages for Super_2 and KP_. (KP period)? Thanks!
-------- Tripayou 05:07 Wed 12 May --------
Tested your last commit, BkSpace is working fine. The two others are assigned to shortcuts that are not needed for playing live so you can consider them as low priority. Obviously I'll be there for testing when you'll fix it.
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-839717402
-- "This is the element_data structure for elements whose *element_type = FORM_TYPE_SELECT_ONE, FORM_TYPE_SELECT_MULT. / / * nesting deeper and deeper, harder and harder, go, go, oh, OH, OHHHHH!! * Sorry, got carried away there. */ struct lo_FormElementOptionData_struct." -- Mozilla source code
- Super_2:
Event key #0x1000022 mod Meta 'Meta' press: scan 0x86 key 0xffec ord 0x9a
Event key #0x1000022 mod None 'Meta' release: scan 0x86 key 0xffec ord 0x9a
- KP_.:
Event key #0x2e mod Keypad '.' press: scan 0x5b key 0xffae ord 0xff
Event key #0x2e mod Keypad '.' release: scan 0x5b key 0xffae ord 0xff
Both of those are different from what I get with "setxkbmap fr", so I will correct the azerty fr setup. If somebody else comes up with another country's keyboard layout, I will make the layout remappings a configuration file. Thanks!
-------- Tripayou 06:54 Wed 12 May --------
- Super_2:
Event key #0x1000022 mod Meta 'Meta' press: scan 0x86 key 0xffec ord 0x9a Event key #0x1000022 mod None 'Meta' release: scan 0x86 key 0xffec ord 0x9a
- KP_.:
Event key #0x2e mod Keypad '.' press: scan 0x5b key 0xffae ord 0xff Event key #0x2e mod Keypad '.' release: scan 0x5b key 0xffae ord 0xff
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-839791616
-- Organic chemistry is the chemistry of carbon compounds. Biochemistry is the study of carbon compounds that crawl. -- Mike Adams
Thanks to you for your reactivity and quick fixes. Keep the good work! ;)
I thought it was over but no...
I have an issue with "Circflex" key ^
, same behavior with its Shift state "Umlaut" ¨
(currently not used in seq66):
key is working fine with Ubuntu 20.04/Gnome but doesn't work with Debian 10/Mate. I'm running both up to date distros on the same hardware (only SSD is different), same version of seq66 installed (0.93.2, master branch) using default qseq66-azerty.ctrl file.
Here is seq66 output in Ubuntu:
- Circflex
^
:
Event key #0x1001252 mod None 'Circflex' press: scan 0x22 key 0xfe52 ord 0xec
Screenset 'Off'; d0 = -1; d1 = 3; inv = 0
Event key #0x1001252 mod None 'Circflex' release: scan 0x22 key 0xfe52 ord 0xec
- Umlaut
¨
:
Event key #0x1001257 mod Shift 'Umlaut' press: scan 0x22 key 0xfe57 ord 0xed
Event key #0x1001257 mod Shift 'Umlaut' release: scan 0x22 key 0xfe57 ord 0xed
and in Debian:
- Circflex
^
:
Event key #0x1001252 mod None 'Circflex' release: scan 0x22 key 0xfe52 ord 0xec
- Umlaut
¨
:
Event key #0x1001257 mod Shift 'Umlaut' release: scan 0x22 key 0xfe57 ord 0xed
Dependencies versions are different, here they are:
- Ubuntu:
libasound2 : 1.2.2-2.1ubuntu2.4
libc6 : 2.31-0ubuntu9.2
libgcc-s1 : 10.2.0-5ubuntu1~20.04
libjack0 : 1:0.125.0-3build2
liblo7 : 0.30-3
libqt5core5a : 5.12.8+dfsg-0ubuntu1
libqt5widgets5 : 5.12.8+dfsg-0ubuntu1
libstdc++6 : 10.2.0-5ubuntu1~20.04
- Debian:
libasound2 : 1.1.8-1
libc6 : 2.28-10
libgcc1 : 1:8.3.0-6
libjack-jackd2-0 : 1.9.14~dfsg-0librazik1
liblo7 : 0.29-1+b11
libqt5core5a : 5.11.3+dfsg1-1+deb10u4
libqt5widgets5 : 5.11.3+dfsg1-1+deb10u4
libstdc++6 : 8.3.0-6
I notice the Debian setup doesn't show the press codes for those keys; it shows onl the release codes. They happen to be two of the four dead keys in azerty fr. The other two are the grave and the accent, but azerty fr has separate keys for some of the letters that use the grave or accent. Anyway, in Seq66 key releases are consider the "inverse" of a key press and are mostly ignored. Not sure I want to mess with that, but will think about it.
Check out this article, you might be able to see differences in the setups between Ubuntu and Debian looking at the configuration files mentioned.
***@***.***/a-simple-humble-but-comprehensive-guide-to-xkb-for-linux-6f1ad5e13450
It also mentions Gnome and Cinnamon.
-------- Tripayou 05:36 Mon 17 May --------
I thought it was over but no... I have an issue with "Circflex" key
^
, same behavior with its Shift state "Umlaut"¨
(currently not used in seq66): key is working fine with Ubuntu 20.04/Gnome but doesn't work with Debian 10/Mate. I'm running both up to date distros on the same hardware (only SSD is different), same version of seq66 installed (0.93.2, master branch) using default qseq66-azerty.ctrl file.Here is seq66 output in Ubuntu:
- Circflex
^
:Event key #0x1001252 mod None 'Circflex' press: scan 0x22 key 0xfe52 ord 0xec Screenset 'Off'; d0 = -1; d1 = 3; inv = 0 Event key #0x1001252 mod None 'Circflex' release: scan 0x22 key 0xfe52 ord 0xec
- Umlaut
¨
:Event key #0x1001257 mod Shift 'Umlaut' press: scan 0x22 key 0xfe57 ord 0xed Event key #0x1001257 mod Shift 'Umlaut' release: scan 0x22 key 0xfe57 ord 0xed
and in Debian:
- Circflex
^
:Event key #0x1001252 mod None 'Circflex' release: scan 0x22 key 0xfe52 ord 0xec
- Umlaut
¨
:Event key #0x1001257 mod Shift 'Umlaut' release: scan 0x22 key 0xfe57 ord 0xed
Dependencies versions are different, here they are:
- Ubuntu:
libasound2 : 1.2.2-2.1ubuntu2.4 libc6 : 2.31-0ubuntu9.2 libgcc-s1 : 10.2.0-5ubuntu1~20.04 libjack0 : 1:0.125.0-3build2 liblo7 : 0.30-3 libqt5core5a : 5.12.8+dfsg-0ubuntu1 libqt5widgets5 : 5.12.8+dfsg-0ubuntu1 libstdc++6 : 10.2.0-5ubuntu1~20.04
- Debian:
libasound2 : 1.1.8-1 libc6 : 2.28-10 libgcc1 : 1:8.3.0-6 libjack-jackd2-0 : 1.9.14~dfsg-0librazik1 liblo7 : 0.29-1+b11 libqt5core5a : 5.11.3+dfsg1-1+deb10u4 libqt5widgets5 : 5.11.3+dfsg1-1+deb10u4 libstdc++6 : 8.3.0-6
-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/ahlstromcj/seq66/issues/47#issuecomment-842288885
--
"Whatever the missing mass of the universe is, I hope it's not cockroaches!" -- Mom
This article is very interesting, after read I noticed my /usr/share/X11/xkb/symbols/fr
files are different. Keyboard management is definitely more complex than it seems.
Not sure I want to mess with that, but will think about it.
Not a problem for me I will assign other keys to set up/down, maybe you should add a note about this in qseq66-azerty.ctrl file.
Thanks.