Syncing docs (README + EXTENDING) re: Text/Label "paste"

This commit is contained in:
Bill Kendrick 2024-12-25 11:45:31 -08:00
parent 023fafe54f
commit c7d449888d
29 changed files with 766 additions and 126 deletions

View file

@ -100,7 +100,7 @@
</p>
<p>
október 10, 2024 </p>
desember 25, 2024 </p>
</center>
</header>
@ -1118,7 +1118,7 @@
</header>
<p>
As of version 0.9.22, Tux Paint's 'Text' and 'Label' tools can present an on-screen keyboard that allows the pointer (via a mouse, eye-tracking systems, etc.) to be used to input characters. Files that describe the layout and available keys are stored in Tux Paint "<code>osk</code>" directory. Each keyboard layout is defined by a number of files (some of which may be shared by different layouts). </p>
As of version 0.9.22, Tux Paint's 'Text' and 'Label' tools can present an on-screen keyboard that allows the pointer (via a mouse, touch screen, eye-tracking systems, etc.) to be used to input characters. Files that describe the layout and available keys are stored in Tux Paint "<code>osk</code>" directory. Each keyboard layout is defined by a number of files (some of which may be shared by different layouts). </p>
<p>
We'll use the QWERTY keyboard as an example: </p>
@ -1142,7 +1142,7 @@
</blockquote>
<p class="note">
<span title="Configuration option">&#9881;</span> <strong>Note:</strong> Blank lines within the "<code>.layout</code>" file will be ignored, as will any text following a "<code>#</code>" (pound/hash) character — it can be used to denote comments, as seen in the example above. </p>
<span title="Configuration option">&#9881;</span> <strong>Note:</strong> Blank lines within the "<code>.layout</code>" file will be ignored, as will any text following a "<code>#</code>" (pound/hash) character — it can be used to denote comments, as seen in the example below. </p>
<p>
The "<code>keyboardlist</code>" line describes which layouts to switch to, when the user clicks the left and right buttons on the keyboard. (See below.) </p>
@ -1157,6 +1157,9 @@
<p>
This describes how big the keyboard is (as a "width × height" grid), and lists each key with its numeric keycode (see the "<code>keymap</code>" file, below), the width it should be drawn at (typically "<code>1.0</code>", to take one space on the keyboard, but in the example below, notice the "<code>TAB</code>" and "<code>SPACE</code>" keys are much wider), the character or text to display on the key, depending on which modifier keys have been pressed (one each for: no modifiers, <b><code>[Shift]</code></b>, <b><code>[AltGr]</code></b>, and <b><code>[Shift]</code></b> + <b><code>[AltGr]</code></b>), and finally whether or not the key is affected by the <b><code>[CapsLock]</code></b> key (use "<code>1</code>") or <b><code>[AltGr]</code></b> (alternate graphics) key (use "<code>2</code>"), or not at all (use "<code>0</code>"). </p>
<p>
The "<code>NEWLINE</code>" keyword is used to indicate the end of one row of the keyboard, and thus subsequent key layout descriptions will be beginning on a new row. </p>
<blockquote>
<p>
<code>WIDTH 15<br>
@ -1193,10 +1196,14 @@
KEY 64 2.0 Alt Alt Alt Alt 0<br>
<br>
# Space<br>
KEY 65 7.0 SPACE SPACE SPACE SPACE 0<br>
KEY 65 5.0 SPACE SPACE SPACE SPACE 0<br>
<br>
# AltGr<br>
KEY 108 2.0 AltGr AltGr AltGr AltGr 0<br>
<br>
# Paste<br>
KEY 143 2.0 Paste Paste Paste Paste 0<br>
<br>
# Arrow to right will change to the next keyboard<br>
KEY 1 1.0 -&gt; -&gt; -&gt; -&gt; 0</code>
</p>
@ -1221,6 +1228,10 @@
<code>2</code>
previous layout (per the layout file's "<code>keyboardlist</code>" setting) </li>
</ul>
<p class="note">
<span title="Version variation">&#128220;</span> Starting with Tux Paint 0.9.35, the <code>XF86Paste</code> keysym (value 143) can be used to initiate a copy/paste clipboard buffer "paste" event. See the "Paste" key in the keyboard layout files. (Pasting via a physical keyboard is initiated using the <code>[Control]</code> + <code>[V]</code> key combination. </p>
</section><!-- H2: Keyboard layout file ("qwerty.h_layout") -->
<section><!-- H2: Keymap file ("us-intl-altgr-dead-keys.keymap") -->

View file

@ -102,7 +102,7 @@
</p>
<p>
október 25, 2024 </p>
desember 25, 2024 </p>
</center>
</header>
<table border="2"
@ -230,6 +230,9 @@
<dl>
<dt>Improved color picker</dt>
<dd>Better behavior when clicking/tapping and dragging hue/saturation box and value slider.</dd>
<dt>Text clipboard paste support</dt>
<dd>The "Text" and "Label" tools support pasting the copy/paste clipboard.</dd>
</dl>
<p>
@ -819,6 +822,9 @@
<p>
Alternatively, press <strong><code>[Tab]</code></strong> and the text will be drawn onto the picture, but the cursor will move to the right of the text, rather than down a line, and to the left. (This can be useful to create a line of text with mixed colors, fonts, styles and sizes.) </p>
<p>
Text from the clipboard (copy/paste buffer) can be inserted with the "Text" and "Label" tools by pressing the <strong><code>[Control]</code> + <code>[V]</code></strong> key combination on a physical keyboard, or clicking the "<strong>Paste</strong>" button in Tux Paint's on-screen keyboard. The text will wrap to the next line if it hits the right edge of the canvas. If the text hits the bottom of the canvas, the pasting will abort, truncating the text. </p>
<p>
Clicking elsewhere in the picture while the text entry is still active causes the current line of text to move to that location (where you can continue editing it). </p>
@ -849,6 +855,9 @@
<p class="note">
<span title="Configuration option">&#9881;</span> The <strong>Label</strong> tool can be disabled (e.g., by selecting "Disable 'Label' Tool" in <em>Tux Paint Config.</em> or running <em>Tux Paint</em> with the "<code>nolabel</code>" option). </p>
<p class="note">
<span title="Version variation">&#128220;</span> The ability to paste text from the clipboard was added in Tux Paint 0.9.35 </p>
</dd>
<dt>
@ -886,7 +895,23 @@
<dd>
<p>
An optional on-screen keyboard is available for the Text and Label tools, which can provide a variety of layouts and character composition (e.g., composing "a" and "e" into "æ"). </p>
An optional on-screen keyboard is available for the Text and Label tools, which can provide a variety of layouts and character composition (e.g., composing "a" and "e" into "æ"). Run Tux Paint with the "<code>--onscreen-keyboard</code>" option, or enable that setting in Tux Paint's configuration file, to enable it. Multiple layouts are offered (currently "QWERTY" and "ABC"), which the user can switch between. Additional configuration options allow specifying a default layout, as well as preventing the layout from being changed. </p>
<p>
The on-screen keyboard appears at the bottom or top of the Tux Paint window, obscuring part of the canvas, depending on where the text insertion cursor is placed. Along with alphabetic, numeric, and some punctuation keys, the keyboard provides: <ul>
<li>A "Backspace" key (&#8656;) to remove the previous character</li>
<li>A "Carriage Return" ("Return"/"Enter") key (&#9166;) to end the current input and begin a new one on the following line (below and to the left)</li>
<li>A "Tab" key (&#8660;) to end the current input and begin a new one at the current cursor position</li>
<li>A "Shift" key (&#8657;) to shift alphabetic keys from lowercase to uppercase, access more punctuation, etc.</li>
<li>A "Caps Lock" key (&#10514;) to toggle permanent shifting of alphabetic keys from lowercase to uppercase (click it again to disable caps lock)</li>
<li>A "Compose" key ("Cmp"), to initiate character composition (e.g., click "Cmp", "a", "e" to produce an "æ" character)</li>
<li>An "Alternate Graphics" key ("AltGr") to access additional characters (e.g., "¿", "ß", etc.)</li>
<li>An "Alternate" key ("Alt")</li>
<li>A "Paste" key to paste the current clipboard's text into the Text or Label tool</li>
<li>Left and right arrows (&larr; &amp; &rarr;) to access different on-screen keyboard layouts</li>
</ul>
</p>
<p class="note">
<span title="Configuration option">&#9881;</span> See the "<a href="OPTIONS.html"><em>Options</em></a>" and "<a href="EXTENDING.html"><em>Extending Tux Paint</em></a>" documentation for more information. </p>
</dd>