<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Creating Keymaps</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>Recent changes to Creating Keymaps</description><atom:link href="https://sourceforge.net/p/vmpk/wiki/Creating%20Keymaps/feed" rel="self"/><language>en</language><lastBuildDate>Mon, 08 Feb 2021 22:35:18 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/vmpk/wiki/Creating%20Keymaps/feed" rel="self" type="application/rss+xml"/><item><title>Creating Keymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v7
+++ v8
@@ -59,7 +59,7 @@

 The last command produces the following output in PDF format, that you can print:

-![PC105 layout with keycodes](/p/vmpk/wiki/Creating Keymaps/attachment/pc105keycodes.png)
+![PC105 layout with keycodes](/p/vmpk/wiki/Creating%20Keymaps/attachment/pc105keycodes.png)

 Another graphic and interactive utility is [xkeycaps](https://www.jwz.org/xkeycaps/)

@@ -67,7 +67,7 @@

 Windows scan codes, from [Wikimedia commons](https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg):

-![Windows scan codes](/p/vmpk/wiki/Creating Keymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)
+![Windows scan codes](/p/vmpk/wiki/Creating%20Keymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)

 This is an useful web page: [http://kbdlayout.info/kbdsp](http://kbdlayout.info/kbdsp/overview+scancodes)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Mon, 08 Feb 2021 22:35:18 -0000</pubDate><guid>https://sourceforge.netea42306ceeed52367e6eaab135673901968cd829</guid></item><item><title>Creating Keymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v6
+++ v7
@@ -59,7 +59,7 @@

 The last command produces the following output in PDF format, that you can print:

-![PC105 layout with keycodes](/p/vmpk/wiki/CreatingKeymaps/attachment/pc105keycodes.png)
+![PC105 layout with keycodes](/p/vmpk/wiki/Creating Keymaps/attachment/pc105keycodes.png)

 Another graphic and interactive utility is [xkeycaps](https://www.jwz.org/xkeycaps/)

@@ -67,7 +67,7 @@

 Windows scan codes, from [Wikimedia commons](https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg):

-![Windows scan codes](/p/vmpk/wiki/CreatingKeymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)
+![Windows scan codes](/p/vmpk/wiki/Creating Keymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)

 This is an useful web page: [http://kbdlayout.info/kbdsp](http://kbdlayout.info/kbdsp/overview+scancodes)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Mon, 08 Feb 2021 22:34:10 -0000</pubDate><guid>https://sourceforge.net4de108e07b534b1fa82d5355a96535363acca85c</guid></item><item><title>Creating Keymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v5
+++ v6
@@ -1,6 +1,6 @@
 #Creating Keymaps

-The purpose of alphanumeric computer keyboards is to make it possible to enter text data into programs. In the case of VMPK, instead of text input the keys are used to produce MIDI notes emulating the function of musical keyboards. The usage of computer alphanumeric keyboards in this way is not the intended one, nor it is orthodox, therefore it should not be expected that in VMPK the alphanumeric keyboard will behave as in other programs. For example: in the main window, no control accepts the focus, nor is it possible to change the focus between the different controls located on the toolbars using the &amp;lt;tab&amp;gt; key. However, most of the functions (such as changing the octave, the instrument, or the MIDI channel) are accessible via keyboard shortcuts, which are also configurable.
+The purpose of alphanumeric computer keyboards is to make it possible to enter text data into programs. In the case of VMPK, instead of text input the keys are used to produce MIDI notes emulating the function of musical keyboards. The usage of computer alphanumeric keyboards in this way is not the intended one, nor it is orthodox, therefore it should not be expected that in VMPK the alphanumeric keyboard will behave as in other programs. For example: in the main window, no control accepts the focus, nor is it possible to change the focus between the different controls located on the toolbars using the Tab key. However, most of the functions (such as changing the octave, the instrument, or the MIDI channel) are accessible via keyboard shortcuts, which are also configurable.

 Entering text data requires computer alphanumeric keyboards to be adapted to the user's language, as there are different alphabets in addition to the Latin alphabet. Even within the same alphabet there are different distributions of the characters, such as [QWERTY](https://en.wikipedia.org/wiki/QWERTY), [AZERTY](https://en.wikipedia.org/wiki/AZERTY), and [QWERTZ](https://en.wikipedia.org/wiki/QWERTZ). In many languages, there are some keys called "dead" that when pressed do not produce any character but affects the next one. All of the above multiplies the number of possibilities and limitations that must be taken into account when transforming keystrokes into musical notes. An alternative is to use low-level key codes instead of alphabetic signs as the source of the note conversion map. The codes sent by the keyboard hardware and managed by the operating system driver are called [scancodes](https://en.wikipedia.org/wiki/Scancode) and are the lowest rung on which a program can rely to process keystrokes on the computer keyboard.

@@ -30,7 +30,7 @@

 The "note" attribute corresponds to the MIDI note, and the "keycode" corresponds to the key number (scancodes on Windows, keycodes on X11 and macOS).

-There is an editing window in VMPK that also allows you to edit translation maps without leaving the program itself, but this editor has a drawback: it is oriented to MIDI notes, and for this reason it is not possible to assign two different keys to the same note. This is not a problem when editing the XML file using a text editor, since the XML file is key oriented. Several different keys can be translated to the same MIDI note. What is not possible is to translate a key to several notes.
+There is an editor window in VMPK that also allows you to edit translation maps without leaving the program itself, but this editor has a drawback: it is oriented to MIDI notes, and for this reason it is not possible to assign two different keys to the same note. This is not a problem when editing the XML file using a text editor, since the XML file is key oriented. Several different keys can be translated to the same MIDI note. What is not possible is to translate a key to several notes.

 There are several programs that are useful for obtaining the key codes and planning new translation maps.

&amp;lt;/tab&amp;gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Mon, 11 Jan 2021 18:17:04 -0000</pubDate><guid>https://sourceforge.net249b7f120a942496f725f6182fa0250f6c7330fe</guid></item><item><title>Creating Keymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -59,7 +59,7 @@

 The last command produces the following output in PDF format, that you can print:

-![PC105 layout with keycodes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/attachment/pc105keycodes.png)
+![PC105 layout with keycodes](/p/vmpk/wiki/CreatingKeymaps/attachment/pc105keycodes.png)

 Another graphic and interactive utility is [xkeycaps](https://www.jwz.org/xkeycaps/)

@@ -67,7 +67,7 @@

 Windows scan codes, from [Wikimedia commons](https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg):

-![Windows scan codes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)
+![Windows scan codes](/p/vmpk/wiki/CreatingKeymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)

 This is an useful web page: [http://kbdlayout.info/kbdsp](http://kbdlayout.info/kbdsp/overview+scancodes)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Thu, 07 Jan 2021 15:55:55 -0000</pubDate><guid>https://sourceforge.net1317658d904f387521598380c87391e270953f2d</guid></item><item><title>Creating Keymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/Creating%2520Keymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Thu, 07 Jan 2021 15:53:48 -0000</pubDate><guid>https://sourceforge.net51e029e440b031ffb349b7214b789596fc7b4761</guid></item><item><title>CreatingKeymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -59,7 +59,7 @@

 The last command produces the following output in PDF format, that you can print:

-![PC105 layout with keycodes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/pc105keycodes.png)
+![PC105 layout with keycodes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/attachment/pc105keycodes.png)

 Another graphic and interactive utility is [xkeycaps](https://www.jwz.org/xkeycaps/)

@@ -67,7 +67,7 @@

 Windows scan codes, from [Wikimedia commons](https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg):

-![Windows scan codes](https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg)
+![Windows scan codes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/attachment/Ps2_de_keyboard_scancode_set_1.svg.png)

 This is an useful web page: [http://kbdlayout.info/kbdsp](http://kbdlayout.info/kbdsp/overview+scancodes)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Thu, 07 Jan 2021 15:51:02 -0000</pubDate><guid>https://sourceforge.net44b2bff29ec56b86a86a1ad68d612de658a69e44</guid></item><item><title>CreatingKeymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -59,7 +59,7 @@

 The last command produces the following output in PDF format, that you can print:

-![PC105 layout with keycodes](pc105keycodes.png)
+![PC105 layout with keycodes](https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/pc105keycodes.png)

 Another graphic and interactive utility is [xkeycaps](https://www.jwz.org/xkeycaps/)

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Thu, 07 Jan 2021 15:49:11 -0000</pubDate><guid>https://sourceforge.net52b6e761f334412ce764f780f967ad42518c3dea</guid></item><item><title>CreatingKeymaps modified by Pedro Lopez-Cabanillas</title><link>https://sourceforge.net/p/vmpk/wiki/CreatingKeymaps/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="creating-keymaps"&gt;Creating Keymaps&lt;/h1&gt;
&lt;p&gt;The purpose of alphanumeric computer keyboards is to make it possible to enter text data into programs. In the case of VMPK, instead of text input the keys are used to produce MIDI notes emulating the function of musical keyboards. The usage of computer alphanumeric keyboards in this way is not the intended one, nor it is orthodox, therefore it should not be expected that in VMPK the alphanumeric keyboard will behave as in other programs. For example: in the main window, no control accepts the focus, nor is it possible to change the focus between the different controls located on the toolbars using the &amp;lt;tab&amp;gt; key. However, most of the functions (such as changing the octave, the instrument, or the MIDI channel) are accessible via keyboard shortcuts, which are also configurable.&amp;lt;/tab&amp;gt;&lt;/p&gt;
&lt;p&gt;Entering text data requires computer alphanumeric keyboards to be adapted to the user's language, as there are different alphabets in addition to the Latin alphabet. Even within the same alphabet there are different distributions of the characters, such as &lt;a class="" href="https://en.wikipedia.org/wiki/QWERTY" rel="nofollow"&gt;QWERTY&lt;/a&gt;, &lt;a class="" href="https://en.wikipedia.org/wiki/AZERTY" rel="nofollow"&gt;AZERTY&lt;/a&gt;, and &lt;a class="" href="https://en.wikipedia.org/wiki/QWERTZ" rel="nofollow"&gt;QWERTZ&lt;/a&gt;. In many languages, there are some keys called "dead" that when pressed do not produce any character but affects the next one. All of the above multiplies the number of possibilities and limitations that must be taken into account when transforming keystrokes into musical notes. An alternative is to use low-level key codes instead of alphabetic signs as the source of the note conversion map. The codes sent by the keyboard hardware and managed by the operating system driver are called &lt;a class="" href="https://en.wikipedia.org/wiki/Scancode" rel="nofollow"&gt;scancodes&lt;/a&gt; and are the lowest rung on which a program can rely to process keystrokes on the computer keyboard.&lt;/p&gt;
&lt;p&gt;Two types of translation maps can be used in VMPK:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;From alphanumeric characters to MIDI notes. These types of maps that we could call high level depend on the user's language settings. The same map can be used in different operating systems, but has the disadvantage that the "dead keys" cannot be used to produce MIDI notes.&lt;/li&gt;
&lt;li&gt;From low-level key codes. These types of maps are independent of the user's language and do not have "dead keys", so they allow us to take advantage of a greater number of keys on the keyboard, but they have the disadvantage that it is necessary to find out these codes and that they are different in each operating system .&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In all cases the translation maps are XML files that can be edited in any operating system with the simple text editor that the user prefers. For example, in Windows, you can use notepad.exe, or even better: &lt;a class="" href="https://notepad-plus-plus.org/" rel="nofollow"&gt;Notepad++&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This is the structure of the low-level translation map:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
    &lt;span class="cp"&gt;&amp;lt;!DOCTYPE rawkeyboardmap&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;rawkeymap&lt;/span&gt; &lt;span class="na"&gt;version=&lt;/span&gt;&lt;span class="s"&gt;"1.0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"11"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"30"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"12"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"32"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"13"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"34"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"15"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"37"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"16"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"39"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        ...
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"60"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"26"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;mapping&lt;/span&gt; &lt;span class="na"&gt;keycode=&lt;/span&gt;&lt;span class="s"&gt;"61"&lt;/span&gt; &lt;span class="na"&gt;note=&lt;/span&gt;&lt;span class="s"&gt;"28"&lt;/span&gt;&lt;span class="nt"&gt;/&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/rawkeymap&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The "note" attribute corresponds to the MIDI note, and the "keycode" corresponds to the key number (scancodes on Windows, keycodes on X11 and macOS).&lt;/p&gt;
&lt;p&gt;There is an editing window in VMPK that also allows you to edit translation maps without leaving the program itself, but this editor has a drawback: it is oriented to MIDI notes, and for this reason it is not possible to assign two different keys to the same note. This is not a problem when editing the XML file using a text editor, since the XML file is key oriented. Several different keys can be translated to the same MIDI note. What is not possible is to translate a key to several notes.&lt;/p&gt;
&lt;p&gt;There are several programs that are useful for obtaining the key codes and planning new translation maps.&lt;/p&gt;
&lt;h2 id="linux"&gt;Linux&lt;/h2&gt;
&lt;p&gt;In the case of Linux, VMPK does not use the &lt;a class="" href="https://www.win.tue.nl/~aeb/linux/kbd/scancodes.html" rel="nofollow"&gt;scancodes&lt;/a&gt; that are produced by the keyboard drivers directly, but uses the so-called 'keycodes' of the X11 keyboard driver, managed through the XCB library. A program to obtain them interatively is &lt;a class="" href="https://linux.die.net/man/1/xev" rel="nofollow"&gt;'xev'&lt;/a&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;xev&lt;/span&gt;

    &lt;span class="n"&gt;KeyPress&lt;/span&gt; &lt;span class="n"&gt;event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;serial&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;synthetic&lt;/span&gt; &lt;span class="k"&gt;NO&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;window&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;x6e00001&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;root&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;x5ec&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;subw&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;x0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt; &lt;span class="mi"&gt;12670217&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;891&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;983&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="p"&gt;:(&lt;/span&gt;&lt;span class="mi"&gt;959&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="mi"&gt;1140&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="k"&gt;state&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;x10&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;keycode&lt;/span&gt; &lt;span class="mi"&gt;51&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;keysym&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="n"&gt;xe7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ccedilla&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="n"&gt;same_screen&lt;/span&gt; &lt;span class="n"&gt;YES&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;XLookupString&lt;/span&gt; &lt;span class="n"&gt;gives&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c3&lt;/span&gt; &lt;span class="n"&gt;a7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ss"&gt;"ç"&lt;/span&gt;
        &lt;span class="n"&gt;XmbLookupString&lt;/span&gt; &lt;span class="n"&gt;gives&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;c3&lt;/span&gt; &lt;span class="n"&gt;a7&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ss"&gt;"ç"&lt;/span&gt;
        &lt;span class="n"&gt;XFilterEvent&lt;/span&gt; &lt;span class="k"&gt;returns&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;False&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;In the previous example, the &lt;strong&gt;keycode 51&lt;/strong&gt; corresponds to the "Ç" key on the Spanish keyboard. This technique is suitable for obtaining the code for one or a few keys, but to plan a complete layout it is much more practical to print a complete keyboard that includes the key codes. This is possible through the &lt;a class="" href="https://linux.die.net/man/1/xkbprint" rel="nofollow"&gt;xkbprint program&lt;/a&gt;:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;    &lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;xkbprint&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;color&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;kc&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ps2pdf&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;xkbprint&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pdf&lt;/span&gt;

    &lt;span class="err"&gt;$&lt;/span&gt; &lt;span class="n"&gt;xkbprint&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;kc&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="n"&gt;lc&lt;/span&gt; &lt;span class="n"&gt;es_ES&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="n"&gt;ps2pdf&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;pc105mono&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pdf&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;The last command produces the following output in PDF format, that you can print:&lt;/p&gt;
&lt;p&gt;&lt;img alt="PC105 layout with keycodes" src="../pc105keycodes.png"/&gt;&lt;/p&gt;
&lt;p&gt;Another graphic and interactive utility is &lt;a class="" href="https://www.jwz.org/xkeycaps/" rel="nofollow"&gt;xkeycaps&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="windows"&gt;Windows&lt;/h2&gt;
&lt;p&gt;Windows scan codes, from &lt;a class="" href="https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg" rel="nofollow"&gt;Wikimedia commons&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img alt="Windows scan codes" rel="nofollow" src="https://commons.wikimedia.org/wiki/File:Ps2_de_keyboard_scancode_set_1.svg"/&gt;&lt;/p&gt;
&lt;p&gt;This is an useful web page: &lt;a class="" href="http://kbdlayout.info/kbdsp/overview+scancodes" rel="nofollow"&gt;http://kbdlayout.info/kbdsp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Another utility: &lt;a class="" href="http://www.kbdedit.com/demo.html" rel="nofollow"&gt;kbdedit&lt;/a&gt;&lt;/p&gt;
&lt;h2 id="macos"&gt;macOS&lt;/h2&gt;
&lt;p&gt;The &lt;a class="" href="https://manytricks.com/keycodes/" rel="nofollow"&gt;KeyCodes&lt;/a&gt; utility is also available in the AppStore: &lt;a href="https://apps.apple.com/us/app/key-codes/id414568915" rel="nofollow"&gt;https://apps.apple.com/us/app/key-codes/id414568915&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pedro Lopez-Cabanillas</dc:creator><pubDate>Thu, 07 Jan 2021 15:45:51 -0000</pubDate><guid>https://sourceforge.netc747cb5bf0252cace42abe8ed58b227823c4e76a</guid></item></channel></rss>