Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: links to the available version of docs #1755

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 11 additions & 12 deletions developer/language/guide/virtual-keys.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ With a virtual character key, in a mnemonic keyboard.
+ [SHIFT ','] >
```

## Virtual keys {#using-virtual-keys}
## Virtual keys

Every key on the keyboard is identified by a virtual key code. Virtual
keys are identified by square brackets `[ ]` containing a combination of
Expand Down Expand Up @@ -167,10 +167,9 @@ The presence of this store also ensures that Caps Lock is handled correctly for
KeymanWeb keyboards (see
[#5460](https://github.com/keymanapp/keyman/issues/5460#issuecomment-966602098)).

## Virtual character keys {#virtual-character-keys}
## Virtual character keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to update all the links to these anchors. This one corresponds to l.84

which might work if we change that to `(#toc-virtual-character-keys).

I'm not sure we want to change all the links this way though.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @darcywong00. The changes of this PR shows this:
image

Do you mean adding {#toc- in front of virtual-character-keys}, not removing them entirely? Also, may I know what is I.84? 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The abbreviation l.84 means "line 84" in the file (above).

keyboard, along with the specified modifier. [More info](#virtual-character-keys)

When I tried locally, clicking the "More info" links didn't work

I noticed the links in "On this page" did work though. And they had the toc- prefix...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @darcywong00. I've seen the abbreviation once before but couldn't remember it.

Would this fix be appropriate? the {#virtual-character-keys} showed up like this if not removed.
image

I am trying {#virtual-character-keys} on "More info" but no success.
image

Only being scrolled to via clicking on "On this page", but the URL shows this:
http://help.keyman.com.localhost:8055/developer/language/guide/virtual-keys#toc-virtual-character-keys-virtual-character-keys-

I think #toc-virtual-character-keys was assigned as an id before converting to markdown.


Keyman 6.0 introduced a new feature known as [mnemonic
layouts](../reference/mnemoniclayout "mnemoniclayout system store"){.link}.
Keyman 6.0 introduced a new feature known as [mnemonic layouts](../reference/mnemoniclayout "mnemoniclayout system store").
This feature requires that the "white" alphabet/numeric/punctuation keys
in the primary section of the keyboard are referenced by the character
on the key cap rather than the key position (as with non-mnemonic
Expand All @@ -182,7 +181,7 @@ appears on a given keycap, not just the unshifted character. For
instance, if you use `['A']`, you will be matching the unshifted <kbd>A</kbd> key;
you must still explicitly state the shift state for the key.

## Reference {#reference}
## Reference

The general format for a virtual character key is:

Expand Down Expand Up @@ -225,8 +224,8 @@ Key codes can start with `K_`, `T_`, `U_` or can be an ISO9995 code.
range `0020-10FFFF`, with sequences separated by `_`. E.g. `U_0259` would
generate a schwa if no rule matches. It is still valid to have a rule such
as `+ [U_0259] > ...`. These codes are only valid for touch layouts.
**Note**: For characters outside the BMP, use Unicode codepoints, not
surrogate pairs (e.g. use `U_10000`, never `U_D800_DC00`).
> [!Note]
> For characters outside the BMP, use Unicode codepoints, not surrogate pairs (e.g. use `U_10000`, never `U_D800_DC00`).

ISO9995 codes
: These codes refer to keys by position on a standard 101-105 key keyboard.
Expand All @@ -248,7 +247,7 @@ The possible shift codes are:
| <kbd>Caps Lock</kbd> on | `CAPS` |
| <kbd>Caps Lock</kbd> off | `NCAPS` |

#### Using Right Alt / AltGr {#using-right-alt-altgr .title}
#### Using Right Alt / AltGr

A caveat for using `RALT`: When using many European keyboards, Windows
internally translates the Right <kbd>Alt</kbd> (or <kbd>AltGr</kbd>) key to `LCTRL`+`RALT`.
Expand All @@ -264,7 +263,7 @@ the following shift combinations in the same keyboard:
| `LCTRL ALT` |
| `LCTRL RALT` |

#### Caps Lock {#caps-lock}
#### Caps Lock

If neither `CAPS` or `NCAPS` is specified, then the <kbd>Caps Lock</kbd> key is
ignored. This means that if you do have a rule that uses `CAPS`, you
Expand Down Expand Up @@ -550,7 +549,7 @@ Notes:
* Right hand blue key `[K_?C1]` / `[B11]` is found on Brazilian Portuguese ABNT layout.


### Common virtual key codes {#common-virtual-key-codes}
### Common virtual key codes

The following table lists all of the common virtual key codes:

Expand Down Expand Up @@ -705,7 +704,7 @@ are included in Keyman for completeness:
| `K_PAUSE` | Pause |
| `K_PRTSCN` | Print Screen |

## Examples {#examples}
## Examples

```keyman
c override default bksp behaviour for 'ng'
Expand All @@ -715,7 +714,7 @@ c override default bksp behaviour for 'ng'
+ [RALT K_E] > 'è'
```

## Virtual keys and touch layouts {#virtual-keys-and-touch-layouts}
## Virtual keys and touch layouts

Touch layouts do not have physical keyboards, so the concept of virtual
keys is in some ways less relevant. However, for compatibility and ease
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<img src="<?= cdn('img/app/10.0/dist-install1-i.png')?>">
<br/>

To learn how to create a custom installable keyboard, <a href="http://help.keyman.com/developer/10.0/distribute/">click here</a>.
To learn how to create a custom installable keyboard, <a href="/developer/10.0/guides/distribute/">click here</a>.
</p>

<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<img src="<?= cdn('img/app/11.0/dist-install1-i.png')?>">
<br/>

To learn how to create a custom installable keyboard, <a href="http://help.keyman.com/developer/11.0/distribute/">click here</a>.
To learn how to create a custom installable keyboard, <a href="/developer/11.0/guides/distribute/">click here</a>.
</p>

<ul>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
</p>

<p>
To learn how to create a custom installable keyboard, <a href="http://help.keyman.com/developer/12.0/guides/distribute/">click here</a>.
To learn how to create a custom installable keyboard, <a href="/developer/12.0/guides/distribute/">click here</a>.
</p>

<h2>Help Index</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
</p>

<p>
To learn how to create a custom installable keyboard, <a href="http://help.keyman.com/developer/current-version/guides/distribute/">click here</a>.
To learn how to create a custom installable keyboard, <a href="/developer/13.0/guides/distribute/">click here</a>.
</p>

<h2>Help Index</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<br/>
Once the keyboard has been downloaded, you should be able to use it as normal.
<br/>
To learn how to create a custom installable keyboard, <a href="http://help.keyman.com/developer/9.0/distribute/">click here</a>.
To learn how to create a custom installable keyboard, <a href="/developer/current-version/guides/distribute/">click here</a>.
</p>

<ul>
Expand Down
2 changes: 1 addition & 1 deletion products/windows/10.0/docs/advanced_locale_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]);
?>
<div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The Locale Editor - Translating the Keyman Desktop User Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="advanced_proxy_config.php">Prev</a> </td><th width="60%" align="center">Chapter 4. Advanced Help</th><td width="20%" align="right"> <a accesskey="n" href="advanced_tsf.php">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="advanced_locale_edit">The Locale Editor - Translating the Keyman Desktop User Interface</h2></div></div></div><p>Localization of the user interface is possible via editing a single XML file called <code class="filename">locale.xml</code>. The default <code class="filename">locale.xml</code> file is in the folder <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\xml\</code>.</p><h3><a name="id592114"></a>Online Locale Editor</h3><p>The recommended method for editing a locale file is to use the Online Editor, available on the
<a class="ulink" href="http://www.keyman.com/keyman/support/locale/" target="_blank">Keyman Website</a>.</p><h3><a name="id592131"></a>First steps to creating a translation</h3><div class="orderedlist"><ol type="1"><li><p>Find the language code for your translation</p><p>Use the <a class="ulink" href="http://www.loc.gov/standards/iso639-2/" target="_blank">ISO 639-2</a> or <a class="ulink" href="http://www.sil.org/iso639-3/" target="_blank">ISO 639-3</a> language code (we recommend using the ISO 639-3 codes as many Keyman keyboard layouts support languages not included in ISO 639-2!).</p></li><li><p>Create a folder for the translated locale.xml file and copy the default locale.xml into it</p><p>The folder should be called: <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\locale\<strong class="userinput"><code>langcode</code></strong></code></p></li></ol></div><h3><a name="id592178"></a>File Format</h3><p>The file is an XML file, with a few different elements:</p><p>
<a class="ulink" href="../../current-version/advanced/locale_edit" target="_blank">Keyman Website</a>.</p><h3><a name="id592131"></a>First steps to creating a translation</h3><div class="orderedlist"><ol type="1"><li><p>Find the language code for your translation</p><p>Use the <a class="ulink" href="http://www.loc.gov/standards/iso639-2/" target="_blank">ISO 639-2</a> or <a class="ulink" href="http://www.sil.org/iso639-3/" target="_blank">ISO 639-3</a> language code (we recommend using the ISO 639-3 codes as many Keyman keyboard layouts support languages not included in ISO 639-2!).</p></li><li><p>Create a folder for the translated locale.xml file and copy the default locale.xml into it</p><p>The folder should be called: <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\locale\<strong class="userinput"><code>langcode</code></strong></code></p></li></ol></div><h3><a name="id592178"></a>File Format</h3><p>The file is an XML file, with a few different elements:</p><p>
</p><div class="itemizedlist"><ul type="disc"><li><p>Entity declarations: these are at the start of the file and define commonly repeated strings within the locale.xml file itself, for example, the name of the product.</p></li><li><p>Dialog elements: these define the size of a dialog box and, for some dialogs, the elements within the dialog.</p></li><li><p>String elements: every translatable string in the file.</p></li></ul></div><p>
</p><p>Nearly all strings have identifiers (e.g. SKButtonOK for the <span class="guibutton">OK</span> button). We have three different types of strings in the file - plain, HTML and format strings:</p><div class="itemizedlist"><ul type="disc"><li><p>Format strings often include %#:s or %#:d markers that are placeholders for parameters, and should be included in a translated string. The order of the markers in the translated string is not important.</p><p>Example: <code class="code">&lt;String Type="FormatString" Id="SKPackageAlreadyInstalled"&gt;A package with the name %0:s is already installed. Do you want to uninstall it and install the new one?&lt;/String&gt;</code></p></li><li><p>Plain strings must be just that - plain text. These are all referenced by the XSL templates that make up the bulk of the Keyman Desktop user interface. You should not place any HTML tags in these entries as they will be stripped before display.</p><p>Example: <code class="code">&lt;String Type="PlainText" Id="S_ShortProductName"&gt;Keyman Desktop&lt;/String&lt;</code></p></li><li><p>HTML strings can include tags - there are only a few of these, and they are flagged in the <code class="filename">locale.xml</code> file. The most obvious of these is in the Welcome screen text.</p><p>Example: <code class="code">&lt;String Type="HTML" Id="S_Splash_Button_Buy" AccessKey="B"&gt;&lt;u&gt;B&lt;/u&gt;uy&lt;/String&gt;</code></p></li></ul></div><p>There is one exception to these formats - the strings on the tray menu do not have identifiers, but instead use the following format (note that the Caption attribute should not include the &amp;amp; entity). You can even use these strings to translate the name of keyboard layouts in the tray menu!</p><p>Example:</p><p>
<code class="code">&lt;String Type="PlainText" Caption="Keyman Configuration..."&gt;localized &amp;amp;text...&lt;/String&gt;</code>
Expand Down
2 changes: 1 addition & 1 deletion products/windows/11.0/docs/advanced_locale_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
]);
?>
<div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">The Locale Editor - Translating the Keyman Desktop User Interface</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="advanced_proxy_config.php">Prev</a> </td><th width="60%" align="center">Chapter 4. Advanced Help</th><td width="20%" align="right"> <a accesskey="n" href="advanced_tsf.php">Next</a></td></tr></table><hr></div><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both" id="advanced_locale_edit">The Locale Editor - Translating the Keyman Desktop User Interface</h2></div></div></div><p>Localization of the user interface is possible via editing a single XML file called <code class="filename">locale.xml</code>. The default <code class="filename">locale.xml</code> file is in the folder <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\xml\</code>.</p><h3><a name="id557285"></a>Online Locale Editor</h3><p>The recommended method for editing a locale file is to use the Online Editor, available on the
<a class="ulink" href="http://www.keyman.com/keyman/support/locale/" target="_blank">Keyman Website</a>.</p><h3><a name="id557314"></a>First steps to creating a translation</h3><div class="orderedlist"><ol type="1"><li><p>Find the language code for your translation</p><p>Use the <a class="ulink" href="http://www.loc.gov/standards/iso639-2/" target="_blank">ISO 639-2</a> or <a class="ulink" href="http://www.sil.org/iso639-3/" target="_blank">ISO 639-3</a> language code (we recommend using the ISO 639-3 codes as many Keyman keyboard layouts support languages not included in ISO 639-2!).</p></li><li><p>Create a folder for the translated locale.xml file and copy the default locale.xml into it</p><p>The folder should be called: <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\locale\<strong class="userinput"><code>langcode</code></strong></code></p></li></ol></div><h3><a name="id557348"></a>File Format</h3><p>The file is an XML file, with a few different elements:</p><p>
<a class="ulink" href="../../current-version/advanced/locale_edit" target="_blank">Keyman Website</a>.</p><h3><a name="id557314"></a>First steps to creating a translation</h3><div class="orderedlist"><ol type="1"><li><p>Find the language code for your translation</p><p>Use the <a class="ulink" href="http://www.loc.gov/standards/iso639-2/" target="_blank">ISO 639-2</a> or <a class="ulink" href="http://www.sil.org/iso639-3/" target="_blank">ISO 639-3</a> language code (we recommend using the ISO 639-3 codes as many Keyman keyboard layouts support languages not included in ISO 639-2!).</p></li><li><p>Create a folder for the translated locale.xml file and copy the default locale.xml into it</p><p>The folder should be called: <code class="filename">[Program Files]\Keyman\Keyman Desktop 10.0\locale\<strong class="userinput"><code>langcode</code></strong></code></p></li></ol></div><h3><a name="id557348"></a>File Format</h3><p>The file is an XML file, with a few different elements:</p><p>
</p><div class="itemizedlist"><ul type="disc"><li><p>Entity declarations: these are at the start of the file and define commonly repeated strings within the locale.xml file itself, for example, the name of the product.</p></li><li><p>Dialog elements: these define the size of a dialog box and, for some dialogs, the elements within the dialog.</p></li><li><p>String elements: every translatable string in the file.</p></li></ul></div><p>
</p><p>Nearly all strings have identifiers (e.g. SKButtonOK for the <span class="guibutton">OK</span> button). We have three different types of strings in the file - plain, HTML and format strings:</p><div class="itemizedlist"><ul type="disc"><li><p>Format strings often include %#:s or %#:d markers that are placeholders for parameters, and should be included in a translated string. The order of the markers in the translated string is not important.</p><p>Example: <code class="code">&lt;String Type="FormatString" Id="SKPackageAlreadyInstalled"&gt;A package with the name %0:s is already installed. Do you want to uninstall it and install the new one?&lt;/String&gt;</code></p></li><li><p>Plain strings must be just that - plain text. These are all referenced by the XSL templates that make up the bulk of the Keyman Desktop user interface. You should not place any HTML tags in these entries as they will be stripped before display.</p><p>Example: <code class="code">&lt;String Type="PlainText" Id="S_ShortProductName"&gt;Keyman Desktop&lt;/String&lt;</code></p></li><li><p>HTML strings can include tags - there are only a few of these, and they are flagged in the <code class="filename">locale.xml</code> file. The most obvious of these is in the Welcome screen text.</p><p>Example: <code class="code">&lt;String Type="HTML" Id="S_Splash_Button_Buy" AccessKey="B"&gt;&lt;u&gt;B&lt;/u&gt;uy&lt;/String&gt;</code></p></li></ul></div><p>There is one exception to these formats - the strings on the tray menu do not have identifiers, but instead use the following format (note that the Caption attribute should not include the &amp;amp; entity). You can even use these strings to translate the name of keyboard layouts in the tray menu!</p><p>Example:</p><p>
<code class="code">&lt;String Type="PlainText" Caption="Keyman Configuration..."&gt;localized &amp;amp;text...&lt;/String&gt;</code>
Expand Down
Loading
Loading