Kvkbd fixes ..

Add LSGT key for non-US keyboards
Add RWIN key with option to set both Win keys to non-toggle for xmodmap use
Fix keycodes for evdev mapping
Show ampersand when on lower level of key
Fix Num pad numbers keycodes where 0-9 are not on lower level of keyboard key
Abbreviate num pad keys text
Fix size of keys for keyboard right side alignment
Use icons for quit and num pad show/hide buttons
Resize quit, num pad show/hide, configure buttons
Add a tooltip for the panel icon
Add help file
pull/25/head
Ray-V 4 years ago
parent f194cf13fc
commit 5a4dc86cee

@ -0,0 +1,9 @@
Known issues with Kvkbd are:
Where the shift character is not the upper case of the lower alpha character, the upper case character will be shown on the key.
For example, on the French azerty keyboard, Shift eacute should show as 2, but shows as Eacute.
Where the KeyPad '.' character on the Del key is mapped as a comma for a particular locale, it stills shows on the key as a period.
These are only problems with the characters displayed on the keys - the correct characters are printed.

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 B

@ -0,0 +1,325 @@
<?xml version="1.0" ?>
<!DOCTYPE book PUBLIC "-//KDE//DTD DocBook XML V4.2-Based Variant V1.1//EN" "dtd/kdex.dtd" [
<!ENTITY kvkbd "<application>Kvkbd</application>">
<!ENTITY xmmp "<application>xmodmap</application>">
<!ENTITY AltGr "<keycap>Alt Gr</keycap>">
<!-- Alt Gr uses U+00a0 for nbsp -->
<!ENTITY kappname "&kvkbd;">
<!ENTITY package "kde-module">
<!ENTITY % addindex "IGNORE">
<!ENTITY % English "INCLUDE">
]>
<book lang="&language;">
<bookinfo>
<title>The &kvkbd; Handbook</title>
<authorgroup>
<author>
<personname><firstname>Todor</firstname><surname>Gyumyushev</surname></personname><email>yodor1@gmail.com</email>
</author>
<author>
<personname><firstname>Guillaume</firstname><surname>Martres</surname></personname><email>smarter@ubuntu.com</email>
</author>
<!-- TRANS:ROLES_OF_TRANSLATORS -->
</authorgroup>
<copyright>
<year>2007-2014</year>
<holder>Todor Gyumyushev</holder>
</copyright>
<copyright>
<year>2008</year>
<holder>Guillaume Martres</holder>
</copyright>
<legalnotice>&FDLNotice;</legalnotice>
<date>2020</date>
<releaseinfo>0.4.8 &tde;</releaseinfo>
<abstract>
&kvkbd; is a virtual keyboard for &tde;
</abstract>
<keywordset>
<keyword>TDE</keyword>
<keyword>Kvkbd</keyword>
<keyword>keyboard</keyword>
<keyword>virtual</keyword>
<keyword>accessibility</keyword>
</keywordset>
</bookinfo>
<chapter id="introduction">
<title>Introduction</title>
&kvkbd; is a simple virtual keyboard for &tde;.
<sbr/>It can be used instead of a physical keyboard or for devices with a touch screen but no keyboard.
<sbr/>It is also useful to quickly test a keyboard mapping to locate some keys.
</chapter>
<chapter id="using-kvkbd">
<title>Using &kvkbd;</title>
<sect1 id="kvkbd-interface">
<title>&kvkbd; interface</title>
When first launched, &kvkbd; will appear in the bottom-right corner of the screen.
<sbr/>It can be moved by clicking and dragging on any part of the background area.
<sbr/><sbr/>Resize it by clicking and dragging on the stripes at the bottom right.
<sbr/>The <guiicon><inlinegraphic fileref="exit-btn.png"/></guiicon> button on the top right is used to hide the keyboard - to show it again, just click on the tray icon.
<sbr/><sbr/>
<emphasis role="bold">French keyboard:</emphasis>
<sbr/>The AD11 key, ringed, is a <link linkend='dead-keys'>dead key</link>.
<mediaobject><imageobject>
<imagedata fileref="kvkbd.png" format="PNG"/>
</imageobject></mediaobject>
To use the numeric keypad, click the double arrow <guiicon><inlinegraphic fileref="num-pad-btn.png"/></guiicon> on the right.
<sbr/>The Num pad display can be toggled by clicking on the Num Lock key <keycap>&#x02116;</keycap>.
<mediaobject><imageobject>
<imagedata fileref="num-pad.png" format="PNG"/>
</imageobject></mediaobject>
To display and select the shift characters, use both &Shift; keys:
<sbr/>&nbsp;&#x02022; Click either &Shift; key, which will 'lock', and then the other &Shift; key and the shift characters will be displayed.
<sbr/>&nbsp;&#x02022; Then click on the character to print it.
<sbr/><sbr/>Otherwise, if you know which key the shift character is on, then the expected behaviour applies, and &Shift;&nbsp;<keycap>'key'</keycap> will print it.
<sbr/><sbr/>
<emphasis role="bold">Spanish keyboard shift characters:</emphasis>
<mediaobject><imageobject>
<imagedata fileref="kvkbds.png" format="PNG"/>
</imageobject></mediaobject>
</sect1>
<sect1 id="config-menu">
<title>The configuration menu</title>
The &kvkbd; configuration menu is accessible by clicking on the configuration button <guiicon><inlinegraphic fileref="config-btn.png"/></guiicon> or by right clicking on the tray icon.
<sbr/><sbr/>Select "<emphasis role="bold">Font ...</emphasis>" to choose the font used to display the characters on the keys.
<sbr/><sbr/>Check "<emphasis role="bold">Auto Resize Font</emphasis>" to resize the font when &kvkbd; is resized.
<sbr/><sbr/>Check "<emphasis role="bold">Dock Widget</emphasis>" to display a small dock which can be placed anywhere on screen.
<sbr/>Click on it to hide or show the virtual keyboard.
<mediaobject><imageobject>
<imagedata fileref="config-menu.png" format="PNG" />
</imageobject></mediaobject>
</sect1>
<sect1 id="keys">
<title>Keys</title>
The &kvkbd; keyboard is based on the US layout with an extra key to the right of Left &Shift; for non-US keyboards - the extra key duplicates <emphasis role="bold">&lt;</emphasis> and <emphasis role="bold">></emphasis> characters on the US keyboard.
<sbr/><sbr/>
For non-US keyboards, the key which is normally lower left of the &Enter; key is placed above the &Enter; key.
<sbr/><sbr/>
Where set up in the keyboard mapping file, &AltGr; will enable selection of the character mapped to the lower right of any key, and &AltGr;&nbsp;&Shift; for any upper right character.
<sbr/><sbr/>
The &Shift;, &Ctrl;, <keycap>Alt*</keycap> buttons 'lock' when clicked to simulate holding down a key on a physical keyboard.
<sbr/>
Whether the <keycap>*Win</keycap> buttons 'lock' will depend on the build time option chosen.
<sbr/><sbr/>
<sect2 id="dead-keys">
<title>Dead Keys</title>
Using &Shift; and/or &AltGr; which need press and hold on a physical keyboard will need click only for &kvkbd;.
<sbr/><sbr/>For example, using the AD11 key [ ˆ ] on the oss variant of the French[fr]/azerty keyboard:
<sbr/><sbr/><command>setxkbmap fr -variant oss</command>
<informaltable>
<tr>
<td>Character:</td><td></td>
<td>dead_circumflex</td><td>&nbsp;</td>
<td>dead_diaeresis</td><td></td>
<td>dead_tilde</td><td></td>
<td>dead_abovering</td>
</tr>
<tr>
<td>K/B press:</td><td></td>
<td><keycap>ˆ</keycap>&nbsp;<keycap>o</keycap></td><td></td>
<td>&Shift;+<keycap>ˆ</keycap>&nbsp;<keycap>u</keycap></td><td></td>
<td>&AltGr;+<keycap>ˆ</keycap>&nbsp;<keycap>e</keycap></td><td></td>
<td>&AltGr;+&Shift;+<keycap>ˆ</keycap>&nbsp;<keycap>a</keycap></td>
</tr>
<tr>
<td>&kvkbd;&nbsp;click:</td><td>&nbsp;</td>
<td><keycap>ˆ</keycap>&nbsp;<keycap>o</keycap></td><td></td>
<td>&Shift;&nbsp;<keycap>ˆ</keycap>&nbsp;<keycap>u</keycap></td><td>&nbsp;</td>
<td>&AltGr;&nbsp;<keycap>ˆ</keycap>&nbsp;<keycap>e</keycap></td><td>&nbsp;</td>
<td>&AltGr;&nbsp;&Shift;&nbsp;<keycap>ˆ</keycap>&nbsp;<keycap>a</keycap></td>
</tr>
<tr>
<td>Printed:</td><td></td>
<td><emphasis role="bold">ô</emphasis></td><td></td>
<td><emphasis role="bold">ü</emphasis></td><td></td>
<td><emphasis role="bold">ẽ</emphasis></td><td></td>
<td><emphasis role="bold">å</emphasis></td>
</tr>
</informaltable>
<sbr/>
<emphasis>Note</emphasis> that &kvkbd; is compiled for keycodes defined by evdev&nbsp;&#x000bb;&nbsp;<filename>/etc/X11/xkb/keycodes/evdev.</filename>
<sbr/>&kvkbd; will have reduced functionality in systems using another keycode definitions file which can be checked by:
<literallayout> &#x02022; running <command>xev</command> in a konsole
&#x02022; pressing or clicking <keycap>Menu</keycap>
&#x02022; looking for <code><emphasis>keycode 135</emphasis></code> among the output
</literallayout>
</sect2>
</sect1>
<sect1 id="loginhelper-mode">
<title>Using &kvkbd; with &tdm;</title>
&kvkbd; doesn't work with &tdm;.
<sbr/>Use with other Display Managers by editing /etc/.../Xsetup.
<sbr/><sbr/>Add this:
<programlisting>HOME=/root kvkbd --loginhelper</programlisting>
There is no configuration button in the loginhelper mode.
<sbr/>To change the default config, launch &kvkbd; as root:
<literallayout><command>tdesu kvkbd</command>
</literallayout>
and make the changes there from the configuration menu.
<sbr/><sbr/>&kvkbd; is run without the --loginhelper option when run from a konsole.
</sect1>
<sect1 id="autostart">
<title>Autostart</title>
Add <filename>kvkbd.desktop</filename> to the &tde; Autostart directory for &kvkbd; to run when &tde; starts.
<sbr/><sbr/>
<emphasis>For a specific keyboard layout:</emphasis>
<sbr/><sbr/>
&nbsp;Exec=<command>setxkbmap &lt;xx>;kvkbd</command>
<sbr/><sbr/>
<emphasis>Or, with &xmmp;:</emphasis> [as in the <link linkend='assign-keycodes'>example</link>]
<sbr/><sbr/>
&nbsp;Exec=<command>setxkbmap &lt;xx>;&xmmp; -e 'keycode 133=quotedbl';&xmmp; -e 'keycode 134=asterisk';kvkbd</command>
<sbr/><sbr/>
<emphasis>Or, including the setxkbmap <link linkend='compose-option'>compose</link> option:</emphasis>
<sbr/><sbr/>
&nbsp;Exec=<command>setxkbmap -option compose:menu &lt;xx>;xmodmap -e 'keycode 133=quotedbl';xmodmap -e 'keycode 134=asterisk';kvkbd</command>
<sbr/><sbr/>
</sect1>
<sect1 id="layout-switching">
<title>Layout switching</title>
&kvkbd; will dynamically switch keyboard layouts as they are changed, either through the command line or using the &tde; Keyboard Tool.
<sbr/><sbr/>
Refer to the <ulink url='help:/kxkb/index.html'>Keyboard Layouts Handbook</ulink> for details on how to set up different and switchable keyboard layouts.
<sbr/><sbr/>
</sect1>
</chapter>
<chapter id="customizing-kvkbd">
<title>Customizing &kvkbd;</title>
<sect1 id="key-mapping">
<title>Key mapping</title>
Using the compose option for <command id="compose-option">setxkbmap</command>, it could be useful for example to set the <keycap>Menu</keycap> key as the compose key to set up user specified characters or character strings.
<formalpara>
<title>Examples</title>
</formalpara>
<literallayout><emphasis role="bold">Add the Euro symbol for a US keyboard</emphasis> <link linkend='one'>[¹]</link>
&#x02022; Add <quote> &lt;Multi_key> &lt;e> &lt;r> : U20AC # "€" EuroSign </quote> to ~/.XCompose <link linkend='two'>[²]</link>
&#x02022; Run <command>setxkbmap -option compose:menu us</command>
&#x02022; Start new konsole or editor
&#x02022; Click <keycap>Menu</keycap> <keycap>e</keycap> <keycap>r</keycap>
.. and <emphasis role="bold">€</emphasis> should be displayed
</literallayout>
<literallayout><emphasis role="bold">Add a shortcut for a frequently used text string</emphasis>
&#x02022; Add <quote> &lt;Multi_key> &lt;t> &lt;r> : "&tde; rocks" </quote> to ~/.XCompose
&#x02022; Run <command>setxkbmap -option compose:menu &lt;xx></command>
&#x02022; Start new konsole or editor
&#x02022; Click <keycap>Menu</keycap> <keycap>t</keycap> <keycap>r</keycap>
.. and <emphasis role="bold">&tde; rocks</emphasis> should be displayed
</literallayout>
<emphasis role="bold" id="assign-keycodes">Assign keycodes</emphasis>
<sbr/>&xmmp; can be used to assign keycodes to any key.
<sbr/><sbr/>If &kvkbd; has been built for the <keycap>Win</keycap> keys to function as non-control keys, they can conveniently be used for frequently used characters which might otherwise be more cumbersome to generate.
<sbr/><sbr/>For example, the <emphasis role="bold">"</emphasis> and <emphasis role="bold">*</emphasis> characters on a gb keyboard are &Shift;+<keycap>2</keycap> and &Shift;+<keycap>8</keycap>, and they could be assigned to the Win keys:
<literallayout><command>&xmmp; -e 'keycode 133=quotedbl'</command>
<command>&xmmp; -e 'keycode 134=asterisk'</command>
</literallayout>
Then <keycap>LWin</keycap> would print <emphasis role="bold">"</emphasis> and <keycap>RWin</keycap> would print <emphasis role="bold">*</emphasis>
<sbr/><sbr/>
<mediaobject></mediaobject>
[¹] <emphasis id="one">To emulate a keyboard where the Euro sign is engraved on the <keycap>5</keycap> key, <command>setxkbmap us -variant euro</command> and &AltGr; <keycap>5</keycap> would be more appropriate.
</emphasis><!-- setxkbmap us -variant euro uses nbsp U+00a0 to avoid line wrapping -->
<sbr/>[²]
<emphasis id="two">This is an easier combination to enter than the other Euro options in /usr/share/X11/locale/&lt;LOCALE>/Compose, which doesn't include this combination.
<sbr/>    However, if ~/.XCompose 'includes' /usr/share/X11/locale/&lt;LOCALE>/Compose, any duplicated compose sequences in ~/.XCompose will have priority.</emphasis><!-- >    However, uses nbsp U+00a0 for indentation -->
</sect1>
<sect1 id="comp-chars">
<title>Composite Characters</title>
Create a character that doesn't have a direct unicode mapping, but is composed of unicode characters in the font being used.
<sbr/><sbr/>
As an example -- a-ogonek [U<emphasis role="bold">0105</emphasis>] + combining acute [U<emphasis role="bold">0301</emphasis>] -- <emphasis role="bold">ą́</emphasis>́
<sbr/><sbr/>
Add the character and chosen key combination to the ~/.XCompose file:
<sbr/>
&#x02022; <command>echo</command> "&lt;Multi_key> &lt;space> &lt;a> : \"$(printf '\u<emphasis role="bold">0105</emphasis>\u<emphasis role="bold">0301</emphasis>')\" # aogonek + combining acute" >> ~/.XCompose
<sbr/><sbr/>
Test:
<sbr/>
&#x02022; Start new editor
<sbr/>
&#x02022; Print the character:   <keycap>Menu</keycap> <keycap>space</keycap> <keycap>a</keycap>
<sbr/><sbr/>
</sect1>
</chapter>
<appendix id="credits">
<title>Credits and License</title>
&kvkbd;
<sbr/><sbr/>Program Copyright &copy; 2007-2014 Todor Gyumyushev <email>yodor1@gmail.com</email>
<sbr/><sbr/>Program and Documentation Copyright &copy; 2008 Guillaume Martres <email>smarter@ubuntu.com</email>
<!-- TRANS:CREDIT_FOR_TRANSLATORS -->
&underFDL; <!-- FDL: do not remove -->
<!-- Determine which license your application is licensed under,
and delete all the remaining licenses below:
(NOTE: All documentation are licensed under the FDL,
regardless of what license the application uses) -->
&underGPL;
</appendix>
<appendix id="installation">
<title>Installation</title>
For your own build of &kvkbd;, see the INSTALL file.
</appendix>
&documentation.index;
</book>

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

@ -33,6 +33,385 @@ getsource_fn
untar_fn
## copy the helpfile docs to the build tree
cp -a $SRCDIR/doc .
## not in this version - introduced for the later qt4 build
sed -i '/CSS Color themes/d' README
## remove meinproc check - there are a number of validity errors relating to the use of <sbr/> etc.,
## which I feel provides a better presentation. The help file displays as intended.
sed -i 's|--check --cache index.cache.bz2|--cache index.cache.bz2|' cmake/modules/TDEMacros.cmake
## These patches are applied in chunks to identify the changes being made and allow any particular change to be easily identified and removed if required
## Add a key, LSGT, between 'left shift' and 'z' for non-US keyboards.
## This duplicates '<' and '>' characters for US keyboards, but otherwise leaves the US keyboard fully functional.
## The key which is normally lower left of Enter on non-US keyboards is above the Enter key.
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
#
## add a key[code] to row 4
@@ -46 +46 @@
-#define R4LEN 7
+#define R4LEN 8
#
## add keycode 94 key between l-shift and z key
## gb=\| fr=<> de=<>| [us=<>] etc
@@ -72,3 +72,3 @@
- //TQString k4="zxcvbnm"; //,./";
- //TQString k4s="ZXCVBNM";
- unsigned int kc4[R4LEN] = {52,53,54,55,56,57,58};//59,60,61};
+ //TQString k4="<zxcvbnm"; //,./";
+ //TQString k4s=">ZXCVBNM";
+ unsigned int kc4[R4LEN] = {94,52,53,54,55,56,57,58};//59,60,61};
#
## reduce width of left shift key
@@ -249 +249 @@
- lshft->resize ( 80,30 );
+ lshft->resize ( 45,30 );
#
## remove one key space after left shift
## and fix spacing
@@ -262 +262 @@
- v->move ( stx+35+16+35+ ( 35*a ),sty+ ( 4*35 ) );
+ v->move ( stx+35+15+ ( 35*a ),sty+ ( 4*35 ) );
EOF
## Replace text on Num pad keys for a better fit
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -402 +402 @@
- TQString txt[9] = { "Ho\nme", TQString::fromUtf8("▲"), "Pg\nUp",
+ TQString txt[9] = { TQString::fromUtf8("H\u2190"), TQString::fromUtf8("▲"), TQString::fromUtf8("P\u2191"),
@@ -404 +404 @@
- "End", TQString::fromUtf8("▼"), "Pg\nDn" };
+ TQString::fromUtf8("E\u2192"), TQString::fromUtf8("▼"), TQString::fromUtf8("P\u2193") };
@@ -448 +448 @@
- numl->setText("Num\nLock");
+ numl->setText(TQString::fromUtf8("\u2116"));
#+ numl->setText("N#");
EOF
## Set a more realistic initial font size
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -676 +676 @@
- double rp = (8.0/600.0)*width();
+ double rp = (10.0/600.0)*width();
EOF
## Fix keycodes for evdev mapping:
## Right shift, LWin, AltGr, Menu, Right Ctrl, Num pad divide, Num pad Enter
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -296 +296 @@
- rshft->setKeyCode ( 50 );
+ rshft->setKeyCode ( 62 );
@@ -321 +321 @@
- win->setKeyCode ( 115 );
+ win->setKeyCode ( 133 );
@@ -349 +349 @@
- ralt->setKeyCode ( 113 );
+ ralt->setKeyCode ( 108 );
@@ -359 +359 @@
- mnu->setKeyCode ( 117 );
+ mnu->setKeyCode ( 135 );
@@ -370 +370 @@
- rctrl->setKeyCode ( 37 );
+ rctrl->setKeyCode ( 105 );
@@ -459 +459 @@
- div->setKeyCode(112);
+ div->setKeyCode(106);
@@ -476 +476 @@
- ent->setKeyCode(36);
+ ent->setKeyCode(104);
EOF
## dead_* characters don't display on keys, so add single click printable character equivalents
## to display on keys - the printed character remains as dead_<whatever>
## Only need for levels 0 and 1 - higher levels don't show on keys
## NoSymbol shows as an outline square on keys - replace with space=blank
## Re: MainWidget.cpp "* therefore keysymtab[] must remain SORTED by keysym value."
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -999,2 +1021,3 @@
} keysymtab[] = {
+ { 0x0000, 0x0020 }, /* NoSymbol -> <- space */
{ 0x01a1, 0x0104 }, /* Aogonek Ą LATIN CAPITAL LETTER A WITH OGONEK */
@@ -1772,2 +1795,18 @@
{ 0x20ac, 0x20ac }, /* EuroSign € EURO SIGN */
+ { 0xfe50, 0x0060 }, /* dead_grave \` */
+ { 0xfe51, 0x00b4 }, /* dead_acute ´ */
+ { 0xfe52, 0x02c6 }, /* dead_circumflex ˆ */
+ { 0xfe53, 0x02dc }, /* dead_tilde ˜ small tilde */
+ { 0xfe54, 0x00af }, /* dead_macron ¯ */
+ { 0xfe55, 0x02d8 }, /* dead_breve ˘ */
+ { 0xfe56, 0x02d9 }, /* dead_abovedot ˙ */
+ { 0xfe57, 0x00a8 }, /* dead_diaeresis ¨ */
+ { 0xfe58, 0x02da }, /* dead_abovering ° */
+ { 0xfe59, 0x02dd }, /* dead_doubleacute ˝ */
+ { 0xfe5a, 0x02c7 }, /* dead_caron ˇ */
+ { 0xfe5b, 0x00b8 }, /* dead_cedilla ¸ */
+ { 0xfe5c, 0x02db }, /* dead_ogonek ˛ */
+ { 0xfe5d, 0x0269 }, /* dead_iota ɩ Latin small iota */
+ { 0xfe64, 0x1fbf }, /* dead_abovecomma Greek Psili */
+ { 0xfe65, 0x1ffe }, /* dead_abovereversedcomma Greek Dasia */
};
EOF
## add a tooltip for the panel icon
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -1825,3 +1825,3 @@
{
-
+ TQToolTip::add ( this, "Virtual keyboard" );
}
EOF
## Fix Num pad numbers where 0-9 aren't the non-shift characters on the keyboard
## E.g. for fr, the num pad '1' [KP_1 keycode 87] appears as '&' [keycode 10] when Num Lock is on
## And fix Del keycode so that KP_Separator prints correctly, eg for gr = comma
## This is a quick-and-dirty fix because it effectively means that this routine is redundant.
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -407 +407 @@
- int nval[9] = {16,17,18,13,14,15,10,11,12};
+ int nval[9] = {79,80,81,83,84,85,87,88,89};
@@ -427 +427 @@
- ins->setKeyCode(19,90);
+ ins->setKeyCode(90,90);
@@ -439 +439 @@
- del->setKeyCode(60,91);
+ del->setKeyCode(91,91);
EOF
## Cosmetic changes:
## Set F4-F5 spacing as per F8-F9
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -97 +97 @@
- f->move ( stx+esc->width() + ( 35*a ) +20,sty );
+ f->move ( stx+esc->width() +3 + ( 35*a ) +25,sty );
@@ -107 +107 @@
- f->move ( stx+esc->width() + ( 35*a ) +40+ ( 4*35 ),sty );
+ f->move ( stx+esc->width() +3 + ( 35*a ) +40+ ( 4*35 ),sty );
@@ -118 +118 @@
- f->move ( stx+esc->width() + ( 35*a ) +45+ ( 8*35 ) +10,sty );
+ f->move ( stx+esc->width() +3 + ( 35*a ) +45+ ( 8*35 ) +10,sty );
#
## resize keys for alignment on right side of keyboard
@@ -139 +139 @@
- bksp->resize ( 46,30 );
+ bksp->resize ( 48,30 );
@@ -149 +149 @@
- tab->resize ( 47,30 );
+ tab->resize ( 48,30 );
EOF
## use icons for quit and num pad show/hide buttons
## these are the 16x16/actions icons used for the system selected icon set
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
#
## num pad show button
@@ -388 +388 @@
- extent->setText(">>");
+ extent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
@@ -689 +689 @@
- extent->setText(">>");
+ extent->setPixmap(TQIconSet(SmallIcon("media-seek-forward")).pixmap());
#
## num pad hide button
@@ -693 +693 @@
- extent->setText("<<");
+ extent->setPixmap(TQIconSet(SmallIcon("media-seek-backward")).pixmap());
#
## quit button
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -380 +380 @@
- quit->setPaletteBackgroundColor ( TQt::red );
+ quit->setPixmap(TQIconSet(SmallIcon("application-exit")).pixmap());
EOF
## Display '&' where it is the lower key character on the key
## E.g. fr be azerty keyboards
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -886,5 +897,9 @@
TQString btn_text(TQChar((uint)ret));
- v.setText(btn_text);
+ TQChar c((uint)ret);
+ if (c=='&')
+ v.setText("&&");
+ else
+ v.setText(btn_text);
TQString btn_upper(btn_text.upper());
EOF
## Add RWin button
patch -N -p0 << EOF || true
## new button added
--- src/MainWidget.h
+++ src/MainWidget.h
@@ -96,2 +96,3 @@
VButton *win;
+ VButton *rwin;
VButton *mnu;
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
#
## differentiate between Win keys for documentation
@@ -320 +320 @@
- win->setText ( "Win" );
+ win->setText ( "LWin" );
#
## reduce the width of the space bar by 45=RWin width and 5=space between keys
@@ -339 +339 @@
- space->resize ( 5*35+28,30 );
+ space->resize ( 5*35+28-45-5,30 );
#
## RWin 'locks' with mouse click
@@ -353,2 +354,11 @@
+ rwin = new VButton ( this,"" );
+ rwin->resize ( 45,30 );
+ rwin->move ( 5+ralt->x() +ralt->width(), sty+ ( 5*35 ) );
+ rwin->setText ( "RWin" );
+ rwin->setKeyCode ( 134 );
+ rwin->setToggleButton ( true );
+ mod_keys.append( rwin );
+ rwin->res();
+
#
## Menu now follows RWin not Alt Gr
@@ -357 +367 @@
- mnu->move ( 5+ralt->x() +ralt->width(), sty+ ( 5*35 ) );
+ mnu->move ( 5+rwin->x() +rwin->width(), sty+ ( 5*35 ) );
EOF
## resize quit, num pad show/hide, configure buttons to see the icons better at reduced size of keyboard
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -387,2 +387,2 @@
- quit->resize ( 15,30 );
- quit->move ( 525,15 );
+ quit->resize ( 20,30 );
+ quit->move ( 526,15 );
@@ -395,2 +395,2 @@
- extent->resize( 15,65 );
- extent->move(525, 85 );
+ extent->resize ( 20,65 );
+ extent->move(526, 85 );
@@ -551,2 +551,2 @@
- popup_menu->resize ( 15,30 );
- popup_menu->move ( 525,15+35 );
+ popup_menu->resize ( 20,30 );
+ popup_menu->move ( 526,15+35 );
#
## move numpad after resizing buttons
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -410 +410 @@
- int padx= 550;
+ int padx= 552;
#
## move and resize keyboard
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -76 +76 @@
- int stx=15;
+ int stx=17;
@@ -593 +593 @@
- int d_width=550;
+ int d_width=552;
@@ -639,2 +639,2 @@
- sdxs = width() - (width() * (150.0/700.0));
- VButton::pw=700.0;
+ sdxs = width() - (width() * (150.0/702.0));
+ VButton::pw=702.0;
@@ -642 +642 @@
- setMinimumSize(700/3,235/3);
+ setMinimumSize(702/3,235/3);
@@ -646,2 +646,2 @@
- sdxb = width() + (width() * (150.0/550.0));
- VButton::pw=550.0;
+ sdxb = width() + (width() * (150.0/552.0));
+ VButton::pw=552.0;
@@ -649 +649 @@
- setMinimumSize(550/3,235/3);
+ setMinimumSize(552/3,235/3);
--- src/VButton.cpp
--- src/VButton.cpp
@@ -5 +5 @@
-double VButton::pw=550.0;
+double VButton::pw=552.0;
EOF
## missing characters in keysymtab[] - for AC12 -> AD13 key on ua keyboard
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
@@ -1251,2 +1251,3 @@
{ 0x06ac, 0x045c }, /* Macedonia_kje ќ CYRILLIC SMALL LETTER KJE */
+ { 0x06ad, 0x0491 }, /* Ukrainian_ghe_with_upturn ґ CYRILLIC SMALL LETTER GHE WITH UPTURN */
{ 0x06ae, 0x045e }, /* Byelorussian_shortu ў CYRILLIC SMALL LETTER SHORT U */
@@ -1266,2 +1267,3 @@
{ 0x06bc, 0x040c }, /* Macedonia_KJE Ќ CYRILLIC CAPITAL LETTER KJE */
+ { 0x06bd, 0x0490 }, /* Ukrainian_GHE_WITH_UPTURN Ґ CYRILLIC CAPITAL LETTER GHE WITH UPTURN */
{ 0x06be, 0x040e }, /* Byelorussian_SHORTU Ў CYRILLIC CAPITAL LETTER SHORT U */
EOF
## generate keycode for Win keys with single click so that they can be used for xmodmap
## User option, set in ./BUILD-TDE.sh
[[ $WinLock != 1 ]] && {
echo -e "\033[36;1m"'patching for Win keys no-lock ..'"\033[0m"
patch -N -p0 << EOF || true
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
#
## don't lock the LWin button
@@ -322 +322 @@
- win->setToggleButton ( true );
+ win->setToggleButton ( false );
## don't lock the RWin button
@@ -359 +359 @@
- rwin->setToggleButton ( true );
+ rwin->setToggleButton ( false );
#
## generate keycode on click rather than wait for next key-click for keycode
--- src/MainWidget.cpp
+++ src/MainWidget.cpp
#
## for LWin
@@ -323 +323,2 @@
- mod_keys.append ( win );
+ connect ( win, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
+ other_keys.append( win );
#
## for RWin
@@ -360 +361,2 @@
- mod_keys.append( rwin );
+ connect ( rwin, TQT_SIGNAL ( keyClick ( unsigned int ) ), this, TQT_SLOT ( keyPress ( unsigned int ) ) );
+ other_keys.append( rwin );
EOF
}
# for 14.0.8, set support for additional language(s) as per I18N variable
# but only for languages available with this package
## for later versions, use the env variable LINGUAS=$I18N - set in BUILD-TDE.sh
@ -86,15 +465,15 @@ echo "
|-----handy-ruler------------------------------------------------------|
$PRGNAM: A virtual keyboard for TDE
$PRGNAM:
$PRGNAM: Re: kvkbd --help
$PRGNAM: loginhelper Stand alone version for use with TDM or XDM.
$PRGNAM: You should Add : HOME=/root kvkbd --loginhelper &
$PRGNAM: to Xsetup to run in xdm/tdm
$PRGNAM:
$PRGNAM:
$PRGNAM: With language support for:
$PRGNAM: en $langs
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
" > $PKG/install/slack-desc
makepkg_fn

@ -548,6 +548,23 @@ sed -i 's|Apps/koffice|Misc/libpng &|' $TMPVARS/TDEbuilds
}
## only run this if kvkbd has been selected
rm -f $TMPVARS/WinLock
[[ $(grep -o kvkbd $TMPVARS/TDEbuilds) ]] && {
dialog --cr-wrap --no-shadow --yes-label "No Lock" --no-label "Lock" --colors --defaultno --title " Kvkbd Win Keys " --yesno \
"
The \Zb\Z6LWin\Zn and \Zb\Z6RWin\Zn keys on the \Zb\Z6Kvkbd\Zn keyboard are set to 'lock' for the next key click.
If they're to be used as control keys to map a number of characters or functions, then they need to be set to \Zr\Z4\ZbLock\Zn while the next key is clicked - this is to simulate holding down the key on a physical keyboard.
If they will only be used as alternately mapped keys using xmodmap, then they will need to be set to generate a keycode on a single click - \Z1N\Zb\Z0o Lock\Zn.
" \
17 75
[[ $? == 0 ]] && 2> $TMPVARS/WinLock
[[ $? == 1 ]] && echo 1 > $TMPVARS/WinLock
}
## option to prefix some package names
## get a list of packages that have SlackBuilds set up to use the prefix 'tde'
grep TDEPFX [ACDL]???/*/*SlackBuild | grep PKGNAM | cut -d/ -f2 > $TMPVARS/TDEPFX_packages
@ -700,6 +717,7 @@ export KEEP_BUILD=$(cat $TMPVARS/KEEP_BUILD)
export RUNLEVEL=$(cat $TMPVARS/RUNLEVEL)
export PRE_DOWNLOAD=$(cat $TMPVARS/PRE_DOWNLOAD)
export TDEPFX=$(cat $TMPVARS/TDEPFX)
export WinLock=$(cat $TMPVARS/WinLock)
## Set installation directory for tqt
TQTDIR=$INSTALL_TDE

Loading…
Cancel
Save