diff --git a/README.md b/README.md index 5284848c..0cab74d2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# README for Seq66 0.99.7 2023-07-18 +# README for Seq66 0.99.7 2023-07-19 __Seq66__: MIDI sequencer/live-looper with a hardware-sampler grid interface; pattern banks, triggers, and playlists for song management; scale and chord @@ -94,7 +94,7 @@ Windows, and using a conventional source tarball. * Recent Files is disabled if there are none. * Revamped the Playlist tab, as it was confusing and very buggy. * Added Windows key-mapping to fix processing "native virtual" keys, - such as the arrow keys. + such as the arrow keys. Also fixes issue #102. * Added auto-play and auto-advance to play-lists. * Fixed bug in rcsettings::make_config_filespec(). * Version 0.99.6: diff --git a/TODO b/TODO index d10b0a29..27c97d9f 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ TO DO for Seq66 0.99.7 Chris Ahlstrom -2019-04-13 to 2023-07-17 +2019-04-13 to 2023-07-19 UI: @@ -40,11 +40,9 @@ Playlists: - When opening play-list, also open next song. Make the play-list active. - Still need to work out playlist naming and replacement. - - Specifying a playlist on the command-line should activate it. - It does, but there was a bug in rcsettings::make_config_filespec(). - - Set all contrib/midi and data/midi MIDI files to use port 0 + - Set all contrib/midi and data/midi MIDI files to use port 0. - Consider adding a configurable play-list auto-advance delay value. - - Why is the first play-list file double loaded? + - Why is the first play-list song file double loaded? - How to force ports to 0 when errors happen, and save the file. From Testing: @@ -52,6 +50,7 @@ From Testing: When zooming, try to keep the same viewport in view. Got this working for horizontal seqroll and perfroll, but not for vertical (refactoring needed). Try to center vertically on notes in the viewport. + Make it center on notes if not visible. Can we distinguish note-insertion from movement snap, to avoid the "L"-then-snap-then-move samba? @@ -78,12 +77,6 @@ Ideas: - Drag and drop MIDI files onto seq66 (see sequencer64 issue #137) -Port-mapping: - - - Consider allowing the addition of an alias to a port. This would - be useful for devices attached to "USB Midi MIDI 1". However, - think about MIDNAM. - ISSUES: #44 "Record live sequence changes" functionality @@ -206,7 +199,7 @@ ISSUES: STATUS: Fixed. #100 Seq66's MIDI timing completely falls apart at JACK buffer sizer larger than 128. - STATUS: In progress. Added a timestamp to each message in the JACK + STATUS: Added a timestamp to each message in the JACK ringbuffer (enabled by a C macro in libseq66/include/seq_features.h). This addes a notable burden on process and we can get buffer overflow errors. Even with message timestamps disabled, the b4uacuse-stress.midi @@ -225,7 +218,7 @@ ISSUES: plain muting (with queue functionality) is good enough for me. Muting using mouse works reasonably well. I am using Windows 7 if this helps with platform specific bugs. - STATUS: Need to improve documentation and testing, including on Windows. + STATUS: It turns out that we needed a different key-map for Windows. #103 One-shot (repetitions != 0) patterns do not play This feature works, but requires the pattern to be armed before @@ -277,31 +270,14 @@ ISSUES: have time signatures; more for appearances, really. - Can we have time-signature changes shown during playback by modifying the combo boxes text? - - Try to eliminate bad time-sig drawing in seqdata when the only - events are time sigs. - -PATTERNS: - - - Make it center on notes if not visible. To close as fixed (and remove from TODO): 24 Release notes in release tag message? - 47 change key map - 54 Qt5 include errors 63 Option to rotate pattern numbers? - 64 NSM: UI show up after restarting the app - 68 MIDI controller initialization step 79 NSM: starts always with a blank pattern - 80 Launchpad MIDI on input bus - 83 MIDI Input not possible: "[midi-input]: in-bus data line error" - 85 Segfaults and extra windows - 89 MIDI control output queue events - 91 No colors in live view with xfce/xubuntu 93 The window of a deleted pattern remains open - 94 Added Song editor expansion button 97 Seq24 differences - 98 Metronome and background recording To close as pushed off to version 2: diff --git a/doc/latex/tex/configuration.tex b/doc/latex/tex/configuration.tex index 3058faf6..238231a4 100644 --- a/doc/latex/tex/configuration.tex +++ b/doc/latex/tex/configuration.tex @@ -861,6 +861,7 @@ \subsubsection{'rc' File / Keyboard Control Section} We suspect most users will be happy enough with the default settings, and users of internationaly keyboards will find the 'ctrl' file easy enough to edit with a programmer's editor. As an example, + \index{keys!AZERTY} see \texttt{qseq66-azerty.ctrl} in the \texttt{data/linux} directory. @@ -1821,6 +1822,7 @@ \subsubsection{'ctrl' File / MIDI Control Settings} Provides a way to adapt to non-US keyboards. Currently, the only supported values are "normal" ("qwerty"), "qwertzy", and "azerty". + \index{keys!AZERTY} For "azerty", the auto-shift feature of group-learning is disabled. The handling of keyboards can be quite complex, and differ between Linux distros and Windows. @@ -2322,6 +2324,7 @@ \subsubsection{'ctrl' File / AZERTY and QWERTZ Keyboards} Keystrokes are mapped to loop, mute-group, and automation control in the \texttt{qseq66.ctrl} file in the \texttt{\$HOME/.config/seq66} directory. + \index{AZERTY}. \textbf{AZERTY}. Exit from \texttt{qseq66}, then copy the \texttt{qseq66-azerty.ctrl} file to the configuration/session directory. @@ -2347,6 +2350,7 @@ \subsubsection{'ctrl' File / AZERTY and QWERTZ Keyboards} \texttt{Shift} key to get the numbers on the numeric row of that keyboard layout. + \index{QWERTZ}. \textbf{QWERTZ}. We do not currently supply this layout, even though we support it, since it is quite similar to the default \textbf{QWERTY} layout; diff --git a/doc/latex/tex/launchpad_mini.tex b/doc/latex/tex/launchpad_mini.tex index 109abfb3..8c725fa9 100644 --- a/doc/latex/tex/launchpad_mini.tex +++ b/doc/latex/tex/launchpad_mini.tex @@ -235,6 +235,8 @@ \subsubsection{Input Control Setup} the only change to make for input-control is to change \texttt{0xff} to the proper \textsl{input} port. On our system, as noted above, that would be input port \texttt{[2]}. + \index{QWERTZ} + \index{AZERTY} \begin{verbatim} [midi-control-settings] diff --git a/doc/latex/tex/windows.tex b/doc/latex/tex/windows.tex index ee39e74c..6a5da09d 100644 --- a/doc/latex/tex/windows.tex +++ b/doc/latex/tex/windows.tex @@ -6,7 +6,7 @@ % \library Documents % \author Chris Ahlstrom % \date 2021-02-13 -% \update 2023-07-06 +% \update 2023-07-18 % \version $Revision$ % \license $XPC_GPL_LICENSE$ % @@ -270,6 +270,36 @@ \subsection{Windows / Seq66 Startup} C:/Program Files/Seq66/data/readme.windows \end{verbatim} +\subsection{Windows / Keyboard Issues} +\label{subsec:windows_keyboard_issues} + + The keystroke processing of \textsl{Seq66} is based on looking up + \textsl{Qt} key scan codes and then finding the matching key modifiers (e.g. + Shift or Ctrl) and native virtual key numbers. + When a match is found, a \textsl{Seq66}-specific ordinal value ranging from + 0 to 255 is found, and that is used to look up the command or function + associated with that keystroke. + + The native virtual key numbers are how the operating system + encodes the various hardware keys on the keyboard. + These numbers vary between + \textsl{Linux}, + \textsl{Windows}, and + \textsl{Mac}. + All these numbers are in a table, and there is (currently) + a table for \textsl{Linux} and a table for \textsl{Windows}. + + The table for \textsl{Windows} was recently completed, but + it is likely that there are some native virtual key numbers + that were not assigned correctly. + Report any issues. + + There is also a table that corrects for + \index{keys!AZERTY} + the French AZERTY layout. + It is a good bet that this table also has errors. + Report any issues. + %------------------------------------------------------------------------------- % vim: ts=3 sw=3 et ft=tex %------------------------------------------------------------------------------- diff --git a/libseq66/src/ctrl/keymap.cpp b/libseq66/src/ctrl/keymap.cpp index 4e00816e..394a5866 100644 --- a/libseq66/src/ctrl/keymap.cpp +++ b/libseq66/src/ctrl/keymap.cpp @@ -25,7 +25,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2018-11-12 - * \updates 2023-07-18 + * \updates 2023-07-19 * \license GNU GPLv2 or above */ @@ -573,6 +573,123 @@ qt_keys (int i) return s_qt_keys[i]; } +/** + * Extended keys, running on system locale with French (fr) AZERTY keymap. + * The first number is the value returned by QKeyEvent::key(). The second + * column is the name returned by QKeyEvent::text(). The scan code is + * returned by QKeyEvent::nativeScanCode(), but is not used in this table. + * The keycode is returned by QKeyEvent::nativeVirtualKey(), and is used to + * look up the s_qt_keys[] slot that will be replaced by the information + * below. + * + * Note that these code are what we found on Debian Linux after running + * "setxkbmap fr". All of the standard ASCII symbols are unchanged with this + * mapping, even though their locations on the French keyboard are different, + * and numeric-key shifting is reversed compared to the US key-map. + * + * Also note that we cannot place the characters themselves in a 'ctrl' file. + * When read, these characters have the value 0xffffffc2 or 0xffffffc3. So + * we have to make up names to use in the 'ctrl' file. + * + * Sylvain's findings on a real AZERTY keyboard: + * +\verbatim + Key #0xa3 '£' scan = 0x23; keycode = 0xa3 + Key #0xa4 '¤' scan = 0x23; keycode = 0xa4 + Key #0xa7 '§' scan = 0x3d; keycode = 0xa7 + Key #0xb0 '°' scan = 0x14; keycode = 0xb0 + Key #0xb2 '²' scan = 0x31; keycode = 0xb2 + Key #0xc0 'à' scan = 0x13; keycode = 0xe0 + Key #0xc7 'ç' scan = 0x12; keycode = 0xe7 + Key #0xc8 'è' scan = 0x10; keycode = 0xe8 + Key #0xc9 'é' scan = 0x0b; keycode = 0xe9 + Key #0xd9 'ù' scan = 0x30; keycode = 0xf9 + Key #0x039c 'µ' scan = 0x33; keycode = 0xb5 + Key #0x20ac '€' scan = 0x1a; keycode = 0x20ac + Key #0x1001252 '^' scan = 0x22; keycode = 0xfe52 + Key #0x1001257 '¨' scan = 0x22; keycode = 0xfe57 +\endverbatim + * + * Just call this function once. + */ + +static void +setup_qt_azerty_fr_keys () +{ + using namespace keyboard; + static const qt_keycodes s_fr_keys [] = + { + /* + * Code Qt Qt Key + * Ordinal Evkey Virtkey Name Modifier + */ + + { 0x21, 0x21, 0x21, "!", KNONE }, // Exclam + { 0x22, 0x22, 0x22, "\"", KNONE }, // QuoteDbl + { 0x23, 0x23, 0x23, "#", KALTGR }, // NumberSign + { 0x26, 0x26, 0x26, "&", KNONE }, // Ampersand + { 0x27, 0x27, 0x27, "'", KNONE }, // Apostrophe + { 0x28, 0x28, 0x28, "(", KNONE }, // ParenLeft + { 0x29, 0x29, 0x29, ")", KNONE }, // ParenRight + { 0x2a, 0x2a, 0x2a, "*", KNONE }, // Asterisk + { 0x2e, 0x2e, 0x2e, ".", KSHIFT }, // Period + { 0x2f, 0x2f, 0x2f, "/", KSHIFT }, // Slash + { 0x3a, 0x3a, 0x3a, ":", KNONE }, // Colon + { 0x3c, 0x3c, 0x3c, "<", KNONE }, + { 0x40, 0x40, 0x40, "@", KALTGR }, // AtSign + { 0x5b, 0x5b, 0x5b, "[", KALTGR }, // BracketLeft + { 0x5c, 0x5c, 0x5c, "\\", KALTGR }, // Backslash + { 0x5d, 0x5d, 0x5d, "]", KALTGR }, // BracketRight + { 0x5e, 0x5e, 0x5e, "^", KALTGR }, // AsciiCircumflex + { 0x5f, 0x5f, 0x5f, "_", KNONE }, // Underscore + { 0x60, 0x60, 0x60, "`", KALTGR }, // QuoteLeft, Backtick + { 0x7b, 0x7b, 0x7b, "{", KALTGR }, // BraceLeft + { 0x7c, 0x7c, 0x7c, "|", KALTGR }, // Bar + { 0x7d, 0x7d, 0x7d, "}", KALTGR }, // BraceRight + { 0x7e, 0x7e, 0x7e, "~", KALTGR }, // Tilde (dead key) + { 0xe0, 0xa3, 0xa3, "L_pound", KNONE }, // £ <--F4 + { 0xe1, 0xa4, 0xa4, "Currency", KALTGR }, // ¤ <--F5 + { 0xe2, 0xa7, 0xa7, "Silcrow", KSHIFT }, // § <--F8 + { 0xe3, 0xb0, 0xb0, "Degrees", KSHIFT }, // ° <--Hyper_R + { 0xe4, 0x01000022, 0xffec, "Super_2", KMETA }, // ² <--Dir_L press + { 0xe5, 0xc0, 0xe0, "a_grave", KNONE }, // à <--KP_Ins + { 0xe6, 0xc7, 0xe7, "c_cedilla", KNONE }, // ç <--KP_Up + { 0xe7, 0xc8, 0xe8, "e_grave", KNONE }, // è <--KP_Right + { 0xe8, 0xc9, 0xe9, "e_acute", KNONE }, // é <--KP_Down + { 0xe9, 0xd9, 0xf9, "u_grave", KNONE }, // ù <--Super/Mod4/Win + { 0xea, 0x039c, 0xb5, "Mu", KSHIFT }, // µ <--(new) + { 0xeb, 0x20ac, 0xb6, "Euro", KALTGR }, // € <--(new) + { 0xec, 0x1001252, 0xfe52, "Circflex", KNONE }, // ^ <--Caret + { 0xed, 0x1001257, 0xfe57, "Umlaut", KSHIFT }, // ¨ <--Diaeresis + { 0xee, 0x01000022, 0xffec, "Super_2r", KNONE }, // ² <--Dir_L release + { 0x00, 0xffffffff, 0xff, "??", KNONE } // terminator + }; + for (int i = 0; s_fr_keys[i].qtk_keyevent != 0xffffffff; ++i) + { + int index = s_fr_keys[i].qtk_ordinal; // not qtk_keyevent + +#if defined SEQ66_PLATFORM_DEBUG_TMI + printf + ( + "Key #%03d '%s': Ord %02x; code %02x-->", + i, qt_keys(index).qtk_keyname.c_str(), + qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent + ); +#endif + + qt_keys(index) = s_fr_keys[i]; + +#if defined SEQ66_PLATFORM_DEBUG_TMI + printf + ( + "Key #%03d '%s': Ord %02x; code %02x\n", + i, qt_keys(index).qtk_keyname.c_str(), + qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent + ); +#endif + } +} + #endif // defined SEQ66_PLATFORM_WINDOWS /** @@ -832,7 +949,7 @@ qt_modkey_ordinal (eventkey qtkey, unsigned qtmodifier, eventkey virtkey) } } -#if defined SEQ66_PLATFORM_DEBUG +#if defined SEQ66_PLATFORM_DEBUG_TMI std::string name = qt_ordinal_keyname(result); char temp[132]; (void) snprintf @@ -922,123 +1039,6 @@ qt_ordinal_keyname (ctrlkey ordinal) "Missing_Key" : qt_keys(ordinal).qtk_keyname ; } -/** - * Extended keys, running on system locale with French (fr) AZERTY keymap. - * The first number is the value returned by QKeyEvent::key(). The second - * column is the name returned by QKeyEvent::text(). The scan code is - * returned by QKeyEvent::nativeScanCode(), but is not used in this table. - * The keycode is returned by QKeyEvent::nativeVirtualKey(), and is used to - * look up the s_qt_keys[] slot that will be replaced by the information - * below. - * - * Note that these code are what we found on Debian Linux after running - * "setxkbmap fr". All of the standard ASCII symbols are unchanged with this - * mapping, even though their locations on the French keyboard are different, - * and numeric-key shifting is reversed compared to the US key-map. - * - * Also note that we cannot place the characters themselves in a 'ctrl' file. - * When read, these characters have the value 0xffffffc2 or 0xffffffc3. So - * we have to make up names to use in the 'ctrl' file. - * - * Sylvain's findings on a real AZERTY keyboard: - * -\verbatim - Key #0xa3 '£' scan = 0x23; keycode = 0xa3 - Key #0xa4 '¤' scan = 0x23; keycode = 0xa4 - Key #0xa7 '§' scan = 0x3d; keycode = 0xa7 - Key #0xb0 '°' scan = 0x14; keycode = 0xb0 - Key #0xb2 '²' scan = 0x31; keycode = 0xb2 - Key #0xc0 'à' scan = 0x13; keycode = 0xe0 - Key #0xc7 'ç' scan = 0x12; keycode = 0xe7 - Key #0xc8 'è' scan = 0x10; keycode = 0xe8 - Key #0xc9 'é' scan = 0x0b; keycode = 0xe9 - Key #0xd9 'ù' scan = 0x30; keycode = 0xf9 - Key #0x039c 'µ' scan = 0x33; keycode = 0xb5 - Key #0x20ac '€' scan = 0x1a; keycode = 0x20ac - Key #0x1001252 '^' scan = 0x22; keycode = 0xfe52 - Key #0x1001257 '¨' scan = 0x22; keycode = 0xfe57 -\endverbatim - * - * Just call this function once. - */ - -static void -setup_qt_azerty_fr_keys () -{ - using namespace keyboard; - static const qt_keycodes s_fr_keys [] = - { - /* - * Code Qt Qt Key - * Ordinal Evkey Virtkey Name Modifier - */ - - { 0x21, 0x21, 0x21, "!", KNONE }, // Exclam - { 0x22, 0x22, 0x22, "\"", KNONE }, // QuoteDbl - { 0x23, 0x23, 0x23, "#", KALTGR }, // NumberSign - { 0x26, 0x26, 0x26, "&", KNONE }, // Ampersand - { 0x27, 0x27, 0x27, "'", KNONE }, // Apostrophe - { 0x28, 0x28, 0x28, "(", KNONE }, // ParenLeft - { 0x29, 0x29, 0x29, ")", KNONE }, // ParenRight - { 0x2a, 0x2a, 0x2a, "*", KNONE }, // Asterisk - { 0x2e, 0x2e, 0x2e, ".", KSHIFT }, // Period - { 0x2f, 0x2f, 0x2f, "/", KSHIFT }, // Slash - { 0x3a, 0x3a, 0x3a, ":", KNONE }, // Colon - { 0x3c, 0x3c, 0x3c, "<", KNONE }, - { 0x40, 0x40, 0x40, "@", KALTGR }, // AtSign - { 0x5b, 0x5b, 0x5b, "[", KALTGR }, // BracketLeft - { 0x5c, 0x5c, 0x5c, "\\", KALTGR }, // Backslash - { 0x5d, 0x5d, 0x5d, "]", KALTGR }, // BracketRight - { 0x5e, 0x5e, 0x5e, "^", KALTGR }, // AsciiCircumflex - { 0x5f, 0x5f, 0x5f, "_", KNONE }, // Underscore - { 0x60, 0x60, 0x60, "`", KALTGR }, // QuoteLeft, Backtick - { 0x7b, 0x7b, 0x7b, "{", KALTGR }, // BraceLeft - { 0x7c, 0x7c, 0x7c, "|", KALTGR }, // Bar - { 0x7d, 0x7d, 0x7d, "}", KALTGR }, // BraceRight - { 0x7e, 0x7e, 0x7e, "~", KALTGR }, // Tilde (dead key) - { 0xe0, 0xa3, 0xa3, "L_pound", KNONE }, // £ <--F4 - { 0xe1, 0xa4, 0xa4, "Currency", KALTGR }, // ¤ <--F? - { 0xe2, 0xa7, 0xa7, "Silcrow", KSHIFT }, // § <--F8 - { 0xe3, 0xb0, 0xb0, "Degrees", KSHIFT }, // ° <--Hyper_R - { 0xe4, 0x01000022, 0xffec, "Super_2", KMETA }, // ² <--Dir_L press - { 0xe5, 0xc0, 0xe0, "a_grave", KNONE }, // à <--KP_Ins - { 0xe6, 0xc7, 0xe7, "c_cedilla", KNONE }, // ç <--KP_Up - { 0xe7, 0xc8, 0xe8, "e_grave", KNONE }, // è <--KP_Right - { 0xe8, 0xc9, 0xe9, "e_acute", KNONE }, // é <--KP_Down - { 0xe9, 0xd9, 0xf9, "u_grave", KNONE }, // ù <--Super/Mod4/Win - { 0xea, 0x039c, 0xb5, "Mu", KSHIFT }, // µ <--(new) - { 0xeb, 0x20ac, 0xb6, "Euro", KALTGR }, // € <--(new) - { 0xec, 0x1001252, 0xfe52, "Circflex", KNONE }, // ^ <--Caret - { 0xed, 0x1001257, 0xfe57, "Umlaut", KSHIFT }, // ¨ <--Diaeresis - { 0xee, 0x01000022, 0xffec, "Super_2r", KNONE }, // ² <--Dir_L release - { 0x00, 0xffffffff, 0xff, "?", KNONE } // terminator - }; - for (int i = 0; s_fr_keys[i].qtk_keyevent != 0xffffffff; ++i) - { - int index = s_fr_keys[i].qtk_ordinal; // not qtk_keyevent - -#if defined SEQ66_PLATFORM_DEBUG_TMI - printf - ( - "Key #%03d '%s': Ord %02x; code %02x-->", - i, qt_keys(index).qtk_keyname.c_str(), - qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent - ); -#endif - - qt_keys(index) = s_fr_keys[i]; - -#if defined SEQ66_PLATFORM_DEBUG_TMI - printf - ( - "Key #%03d '%s': Ord %02x; code %02x\n", - i, qt_keys(index).qtk_keyname.c_str(), - qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent - ); -#endif - } -} - /** * Tweaks the setup for some keyboard layouts that give direct access (i.e. * without using a "dead key") to extended ASCII keys. diff --git a/libseq66/src/ctrl/winkeys.hpp b/libseq66/src/ctrl/winkeys.hpp index b460122b..09dfdea4 100644 --- a/libseq66/src/ctrl/winkeys.hpp +++ b/libseq66/src/ctrl/winkeys.hpp @@ -27,7 +27,7 @@ * \library seq66 application * \author Chris Ahlstrom * \date 2023-07-18 - * \updates 2023-07-18 + * \updates 2023-07-19 * \license GNU GPLv2 or above * * Include this file in keymap.cpp if building for Windows. The main @@ -259,8 +259,8 @@ qt_keys (int i) { 0xac, 0x01000053, 0x5b, "Super_L", KNONE }, // Left-Windows, VK_LWIN { 0xad, 0x01000054, 0x5c, "Super_R", KNONE }, // Right-Windows, VK_RWIN { 0xae, 0x01000055, 0x5d, "Menu", KNONE }, // Win-Menu key, VK_APPS ? - { 0xaf, 0x01000056, 0xaf, "Hyper_L", KNONE }, - { 0xb0, 0x01000057, 0xb0, "Hyper_R", KNONE }, + { 0xaf, 0x01000056, 0xaf, "Hyper_L", KNONE }, // ??? + { 0xb0, 0x01000057, 0xb0, "Hyper_R", KNONE }, // ??? { 0xb1, 0x01000058, 0x2f, "Help", KNONE }, // VK_HELP { 0xb2, 0x01000059, 0xb2, "Dir_L", KNONE }, { 0xb3, 0x01000060, 0xb3, "Dir_R", KNONE }, // Direction_R @@ -373,6 +373,90 @@ qt_keys (int i) return s_qt_keys[i]; } +/** + * Extended keys, running on system locale with French (fr) AZERTY keymap, + * for Windows. + * + * Just call this function once. + */ + +static void +setup_qt_azerty_fr_keys () +{ + using namespace keyboard; + static const qt_keycodes s_fr_keys [] = + { + /* + * Code Qt Qt Key + * Ordinal Evkey Virtkey Name Modifier + */ + + { 0x21, 0x21, 0x31, "!", KNONE }, // Exclam + { 0x22, 0x22, 0xde, "\"", KNONE }, // QuoteDbl + { 0x23, 0x23, 0x33, "#", KALTGR }, // NumberSign + { 0x26, 0x26, 0x37, "&", KNONE }, // Ampersand + { 0x27, 0x27, 0xde, "'", KNONE }, // Apostrophe + { 0x28, 0x28, 0x39, "(", KNONE }, // ParenLeft + { 0x29, 0x29, 0x30, ")", KNONE }, // ParenRight + { 0x2a, 0x2a, 0x38, "*", KNONE }, // Asterisk + { 0x2e, 0x2e, 0xbe, ".", KSHIFT }, // Period + { 0x2f, 0x2f, 0xbf, "/", KSHIFT }, // Slash + { 0x3a, 0x3a, 0xba, ":", KNONE }, // Colon + { 0x3c, 0x3c, 0xbc, "<", KNONE }, + { 0x40, 0x40, 0x32, "@", KALTGR }, // AtSign + { 0x5b, 0x5b, 0xdb, "[", KALTGR }, // BracketLeft + { 0x5c, 0x5c, 0xdc, "\\", KALTGR }, // Backslash + { 0x5d, 0x5d, 0xdd, "]", KALTGR }, // BracketRight + { 0x5e, 0x5e, 0x36, "^", KALTGR }, // AsciiCircumflex + { 0x5f, 0x5f, 0xbd, "_", KNONE }, // Underscore + { 0x60, 0x60, 0xc0, "`", KALTGR }, // QuoteLeft, Backtick + { 0x7b, 0x7b, 0xdb, "{", KALTGR }, // BraceLeft + { 0x7c, 0x7c, 0xdc, "|", KALTGR }, // Bar + { 0x7d, 0x7d, 0xdd, "}", KALTGR }, // BraceRight + { 0x7e, 0x7e, 0xc0, "~", KALTGR }, // Tilde (dead key) + { 0xe0, 0xa3, 0x73, "L_pound", KNONE }, // £ <--F4 + { 0xe1, 0xa4, 0x74, "Currency", KALTGR }, // ¤ <--F5 + { 0xe2, 0xa7, 0x77, "Silcrow", KSHIFT }, // § <--F8 + { 0xe3, 0xb0, 0xb0, "Degrees", KSHIFT }, // ° <--Hyper_R ??? + { 0xe4, 0x01000022, 0xb2, "Super_2", KMETA }, // ² <--Dir_L press ??? + { 0xe5, 0xc0, 0x2d, "a_grave", KNONE }, // à <--KP_Ins ??? + { 0xe6, 0xc7, 0x26, "c_cedilla", KNONE }, // ç <--KP_Up + { 0xe7, 0xc8, 0x27, "e_grave", KNONE }, // è <--KP_Right + { 0xe8, 0xc9, 0x28, "e_acute", KNONE }, // é <--KP_Down + { 0xe9, 0xd9, 0x5d, "u_grave", KNONE }, // ù <--Super/Mod4/Win + { 0xea, 0x039c, 0xb5, "Mu", KSHIFT }, // µ <--(new) + { 0xeb, 0x20ac, 0xb6, "Euro", KALTGR }, // € <--(new) + { 0xec, 0x1001252, 0x36, "Circflex", KNONE }, // ^ <--Caret + { 0xed, 0x1001257, 0xde, "Umlaut", KSHIFT }, // ¨ <--Diaeresis + { 0xee, 0x01000022, 0xb2, "Super_2r", KNONE }, // ² <--Dir_L release + { 0x00, 0xffffffff, 0xff, "??", KNONE } // terminator + }; + for (int i = 0; s_fr_keys[i].qtk_keyevent != 0xffffffff; ++i) + { + int index = s_fr_keys[i].qtk_ordinal; // not qtk_keyevent + +#if defined SEQ66_PLATFORM_DEBUG_TMI + printf + ( + "Key #%03d '%s': Ord %02x; code %02x-->", + i, qt_keys(index).qtk_keyname.c_str(), + qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent + ); +#endif + + qt_keys(index) = s_fr_keys[i]; + +#if defined SEQ66_PLATFORM_DEBUG_TMI + printf + ( + "Key #%03d '%s': Ord %02x; code %02x\n", + i, qt_keys(index).qtk_keyname.c_str(), + qt_keys(index).qtk_ordinal, qt_keys(index).qtk_keyevent + ); +#endif + } +} + #endif // SEQ66_WINKEYS_HPP /*