Need on-screen keyboard with mouse functions

A home for all kinds of Puppy related projects
Message
Author
User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

The Pup With No Name - Final ISO (tpwnn_final.iso)

#91 Post by ETP »

The above is now available on my server. After yet another change of heart, I have reverted to launching Xvkbd at startup but then immediately minimising it. The Xvkbd mode on Radar will raise it as and when required. (You do not need to ever launch it from Radar Config)

The ISO remains screen resolution agnostic but I have optimised the size and position of Xvkd and tweaked its fonts for better clarity. Files changed include the following:

XVkbd-common
XVkbd-uk
htop.rc (cosmetic change)
AbiWord.Profile (attempt to get around its nasty habit of launching too small)
Inter (A Magoo panel script)
Start_xvkbd

The change to “inter
Attachments
final.jpg
(78.6 KiB) Downloaded 2190 times
tpwnn-final.png
(58.99 KiB) Downloaded 1997 times
Thunderbird.png
(40.87 KiB) Downloaded 1990 times
Last edited by ETP on Mon 22 Apr 2013, 12:58, edited 4 times in total.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Is there an easier way to achieve focus?

#92 Post by mikeslr »

Hi All,

@ETP -- Beautiful job of customization. Really love how clear and distinct you've gotten everything to appear, especially the symbols on the onscreen keyboard. I've been casing tpwnn looking for stuff I can appropriate for use on a wary 5.5 build. Mind passing on how you tweaked the fonts?

Currently my xvkbd startup script argument on a 1600x900 display is, code:

#!/bin/sh
read MAXX MAXY <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`
xvkbd -geometry $(($MAXX*5315/10000))x$(($MAXY/5))+$(($MAXY*13/20))+$(($MAXX*10/24)) -always-on-top &

where it places the keyboard just above jwm's taskbar and to the right of radar's display. I haven't tried it yet on my Thinkpad T42 where my resolution would be 1024x768. The forumula isn't particularly elegant, and I'm not sure why it works as getting it involved a lot of trial and error. When I couldn't get my mind around bc, I figured the integer math of BASH would suffice: ignoring remainders as not being particularly important. The first two parameters (Width and Height) produced the right size, but the offsets from the keyboard's default top-left position weren't and what I thought were logical corrections to mistaken logic resulted in chaos. Hopefully, SFR, or someone, will put forward a elegant & universal formula for placing a keyboard of slightly more than one-half the screen-width and 20% of the screen height adjacent to radar if the later occupies the right-bottom corner +/-. Keeping the two close together is less visually distracting.
I think I've said it before, but radar's xvkbd mode does a really great job of making typing much easier. Hopefully, however, I've missed something running under wary, or something I don't recall overcoming under tpwnn. In order to type into Abiword, I have to:
(1) Open Abiword=several mouse-movements
(2) Click xvkbd's focus button=several mouse-movements or clicks to get into SVKBB mode;
(3) If in XVKBD Mode, allow the mouse to scroll off the keyboard and, in any event
(4) click move
(5) maneuver the cursor onto the text portion of Abiword's window; [Hint: allowing the cursor to scroll off the screen can be a short-cut)
(5) Click to stop further movement;
(6) Left-click to set focus on Abiword;
(7) click "more";
(8) click XVKBD mode
(9) Begining to type and NEVER LET THE MOUSE SCROLL off the keyboard.
The above sequence has to be repeated to change focus from Abiword to a different receiver of text and, of course, repeated if I want to shift focus back to Abiword.
The point, however, is setting up can take a great deal of time and effort.
Some of the above can be eliminated if using something like xbindkeys can bind the opening (and maybe focus) of frequently used applications to xvkbd's function keys or Alt/Ctl/Meta + Keys. I'll be looking into that over the next couple of days. I don't want commands which will conflict with those built into commonly used applications, and in case of a conflict will see if the latter can be modified. Additionally, keyboard commands should be relatively easy to remember.
I wasn't able to use radar's Cycle mode to get xvkbd's typing focus on an application. Did I miss something?

mikesLr

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#93 Post by SFR »

xvkbd -geometry $(($MAXX*5315/10000))x$(($MAXY/5)) $(($MAXY*13/20)) $(($MAXX*10/24)) -always-on-top &
It works fine with my 1366x768.
However, since you asked, here's a variation, which works almost the same, but makes it easier to customize offsets from right and bottom screen edges (here: 192px & 64px respectively):

Code: Select all

xvkbd -geometry $(($MAXX/2))x$(($MAXY/5))+$((($MAXX/2)-192))+$(($MAXY-($MAXY/5)-64)) -always-on-top
To add that "slightly more than one-half the screen-width", eg:

Code: Select all

xvkbd -geometry $((($MAXX/2)+($MAXX/8)))x$(($MAXY/5))+$((($MAXX/2)-($MAXX/8)-192))+$(($MAXY-($MAXY/5)-64)) -always-on-top
which is ½+⅛=
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Xvkbd fonts plus more impending changes to TPWNN

#94 Post by ETP »

@mikeslr

Launching Xvkbd from a terminal will show if you have an issue with fonts.
I suspect that this will be base puppy dependant. In the case of precise there was an issue with lucidatypewriter and lucida.
The guidance can be found here:
http://homepage3.nifty.com/tsato/xvkbd/faq.html
Installing font packages as suggested, did not do the trick, so I simply changed everything to helvetica and also changed some styles and point sizes. I did not find a way of improving the fonts in the “words
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Thanks, and further notes

#95 Post by mikeslr »

Hi All, SFR & ETP

Thanks SFR for the positioning formula. My fudge didn't work in my Thinkpad T42 1024x768 Graphics. Will try-out your formula sometime today. But especially thanks for the information regarding the limitation of xvkbd when run under jwm. Although I want to build a Pup based on Wary (so that it can be deployed to old/cheap-2nd-hand laptops) more important is a system which doesn't get in its own way. So I considered alternative base-pups. However, wondering whether Wary could be run with an alternative window-manager lead me to Tote's post that vicmz's Openbox+Extra, http://www.murga-linux.com/puppy/viewtopic.php?t=82800, worked (at least if the lxpanel rather than the Tint2 panel choice was made http://www.murga-linux.com/puppy/viewto ... 125#689125). I'll try that approach first. Caveat: I, at least, couldn't find anyway under this Openbox to select ETP's great finds of LargeWhite Cursor, faenza_lrxw icon theme or UbuntuFont. They could be installed, just not selected. But if selected while running jwm, they carried over when the switch to OpenBox was made. I'll have to see whether this Openbox under Wary presents any obstacles to the essential applications: xvkbd and SFR's radar.
Thanks ETP for the information about fonts. I saw that discussion on xvkbd's faq. But my ignorance in the area of font use/customization turned it into gibberish.
On thing I stumbled across while experimenting with positioning may help if you aren't able to achieve a formula solution. It seems to be one of Puppy's hidden talents, or at least one I was here-to-fore unaware of. I had sized and positioned xvkbd's onscreen keyboard. Right-clicking the top edge produced a drop-down menu, one of whose choices was “stick.
Last edited by mikeslr on Sun 21 Apr 2013, 18:44, edited 1 time in total.

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Changes to TPWNN

#96 Post by ETP »

Hi All,
I have now re-uploaded TPWNN with its auto-launch of the "Word completion" window. When xvkb is selected on Radar both windows will be raised.
The positioning should suit a wide range of resolutions.
Attachments
image-1.png
(116.08 KiB) Downloaded 856 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Alternate "words" file for xvkbd

#97 Post by mikeslr »

Hi All,

I've been busy exploring possibilities but, as yet, don't have anything worth publishing except an alternate "words" file to be used with xvkbd's word-completion module.
In the single switch frame of reference, the words file poses a Goldilock's problem: too few words and it requires more typing and more adding to the list; too many and it takes too much time to make a selection. I've forgotten the exact number, but I think that Ubuntu's "small" list had about 50,000 entries. So I wondered if somewhere on the web there might be a list of about 5,000 of the most frequently used words.
One thing great about the internet is that somewhere someone --having an odd view of what is important-- has, by now, posted what the rest of us might consider trivia. I can appreciate that "important" is a relative term. For eight years I was addicted to Bridge.
Sure enough some Scrabble fans thought to post a list of 10,000 most frequently used words in the English Language --well at least among scrabble players-- arranged in order of frequency. Considering that words of less 4 letters would be more trouble than they're worth, I copied the first 6.000 into a file and the used Bash's sort command to alphabetize it. [Wasn't sure if Sato had built sorting into xvkbd]. Then deleted all words having less than 4 letters. Also discovered that some Scrabble players may have cheated in preparing the list as some words on it were obviously French or German, and there were many "near" duplicates in that a word would appear two or three times, once with all small letters, once with a beginning capital, and once with all capitals. At any rate, unless the word was obviously a name, I deleted duplicates. I left in "near-duplicates" where the distinguishing character was an ending "s" denoting a plural.
Not exactly a scientifically developed list, but probably "close enough for government work."
Attached is a "words" file. It can be used by removing the false ".zip" from the file and placing it in the /usr/share/dict folder.

mikesLr
Attachments
words.zip
remove false &quot;.zip&quot; including the dot, and place in /usr/share/dict
(33.21 KiB) Downloaded 656 times

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Selecting text: xvkbd + radar in xvkbd mode

#98 Post by mikeslr »

Hi All,

Stumbled on this while reading xvkbd's site for something else. Each of what it refers to as Quick Modifiers can be set to "locked" in xvkbd's property panel: Right-click xvkbd "label" on bottom left of keyboard. Once "Shift" is "locked" the usual editing commands --shift+arrows-- can be used while in radars xvkbd mode to select text (more than one key at a time) for copying to the clipboard via Ctl+c or Ctl+x and subsequent pasting via Ctl+v. Caution: I'm Just starting to experiment. I don't know what functions locking "shift" may interfere with. Please post if you find any. Locking survives a reboot. Getting out of "selection mode" may require that the Esc key be pressed.

mikesLr

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Letter Frequency Keyboard for xvkbd & radar/navbar

#99 Post by mikeslr »

Hi All,
Caution: requires an upgrade of radar/Navbar. See SFR's post below for the link.

Attached you'll find a modified keyboard for use with xvkbd. The attached picture shows what it will look like when installed. According to the xvkbd website there are four ways to set alternative keyboard as the default. But the only way I found –and understood-- was as follows: There's a file named “xvkbd
Attachments
Keys_by_Frequency.png
Screenshot of modified xvkbd keyboard
(10.66 KiB) Downloaded 1611 times
XVkbd-1switch.zip
Keyboard arranged by letter frequency. Note delete false dot-zip ending
(2.36 KiB) Downloaded 660 times
Last edited by mikeslr on Tue 21 May 2013, 14:37, edited 1 time in total.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#100 Post by SFR »

mikeslr wrote:Not sure why radar is closing when xvkbd mode is selected.
Hi Mike

It's because I was using xwininfo to read dimensions of XVKBD window by its name: "xvkbd - Virtual Keyboard" and xwininfo couldn't find it due to additional "(One Switch)" string:
xvkbd.title: xvkbd - Virtual Keyboard (OneSwitch)

But it's been fixed in v1.1.2, so now it works ok.

However, in order to be able to find XVKBD window at all I need it to have a certain, concrete string in its name, so let's say that the initial sequence of window name must be always:
xvkbd - Virtual Keyboard
and after it you can freely add other characters, ok? :wink:

Btw, nice job with the keymap!

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Alternate Keyboard Exploration

#101 Post by mikeslr »

Hi SFR,

I kind of guessed it might be the way radar/Navbar located the corner of xvkbd's onscreen keyboard, but as much of their code is above my level of understanding I wasn't going to ask before checking out other possibilities. For a modified keyboard to work all the following must be properly functioning together: the computer's hardware, the operating system (in this case a version of Puppy), xvkbd, radar or navbar and the modification.
Going back to the drawing board was not without its benefits. I had been using wary 5.5. But since wary might have been the problem I decided to build a pup using Precise. While it didn't solve the "radar closing" problem, it made it clear that xvkbd's inability to open menus using Alt-KeyLetter combinations was a wary failing. Precise functions properly.
Another possibility was that my modifications were too radical: that "non-printing" control keys, such as Ctrl, space, Backspace, and so on were limited to the edges by xvkbd. So I re-designed a keyboard which only re-arranged the "printing" characters. Although it might in the hands of an experienced user add a little to the time it takes to accomplish something, it was in many ways more rational and would be easier to learn. Now that the "radar closing problem" is solved, I'll rework it as an alternative to the keyboard I posted.

Thanks again for your continuing efforts on this project. I do hope you've enjoyed the challenge and aren't getting bored with it. I'll email you about a couple other ideas I've had. But it seems to have gotten to be about 1:27 in the morning. So I'll leave that to another day.

mikesLr
Last edited by mikeslr on Tue 21 May 2013, 14:43, edited 2 times in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Question for anyone interested in this project

#102 Post by mikeslr »

Hi All,

I've used Wary 5.5 and Upup 3.72 to explore xvkbd and radar/navbar. When xvkbd is started from a terminal a message appears about the possibility that the AltGr key may not work. But I've only used, and modified, the "common=US default" and the UK keyboard which don't include an AltGr key. Being in the US, and limited in my language ability to English, I'll leave resolution of any problems with AltGr to others. My concern is keys that apparently have been included in all of Tom Sato's builds, but don't seem to function on either of the two computers I've worked with: a ZT system built around a 4x AMD Phenom(tm) II X4 945 Processor, and an IBM Thinkpad T42.
The first of those keys bears the label "Meta." I've read that its supposed to function as the "Windows" key on the US International Keyboard, or (I think) the Super_L key on a Mac. (Not having a Mac, I wasn't paying much attention). But on my computers it not only does nothing, running XEV and clicking it --or it and another key-- fails to indicate anything beyond that the other key was pressed. The Meta key could be used to create keyboard commands that didn't conflict with keyboard commands built into the windows manager or applications. But if pressing it doesn't register as a recognizable event, than Meta keys are just occupying space which could be better used for keys which are recognizable. Does anyone have a system which recognizes the Meta Keys? And if so, does anyone know how to make use of them?
The other key which, at least on my systems, appears to just occupy space is the "Compose" Key. In the file which creates the keyboard layout although it bears the label "compose", it is otherwise referred to as the Multi_Key. Does anyone know what its supposed to do, and how to use it?
Another almost superfluous key is CapLocks. With xvkbd's properties set to lock the shift key, and Shift clicked on the clicking of all further keys will generated their shifted symbols. The only reason to use Caplocks instead would be to type Capital Letters together with numbers. Shift, while on, will print the symbols over the numbers rather than the numbers.
As I previously mentioned, in order to include an "Esc=Escape" key on each row, I've had to leave out some little used symbols found on the "Common" keyboard. There are at least two symbols found on the UK keyboard that also could be included. I'm sure that I can find other symbols that would have some use. So I'd like some feedback and suggestions.

mikesLr
Last edited by mikeslr on Tue 21 May 2013, 15:04, edited 1 time in total.

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Alternate Letter Frequency Keyboard for xvkbd & radar/navbar

#103 Post by mikeslr »

Hi All,

I've attached an alternate keyboard for use with xvkbd and radar or Navbar. Also attached is a photo of how it will appear. See my last couple of posts for explanations of the advantage and disadvantage of this arrangement of keys, and instructions of how to put it to use.

Happy Computing,

mikesLr


P.S. According to the analysis of letter frequency based on the Gutenberg Project
E T A O I N S H R D L U
are the 12 most frequently used letters. You may wonder why they weren't all placed on the first row below the Function Keys. When radar/Navbar goes into xvkbd mode it begins to scroll down the left edge of the onscreen keyboard until the "button" is pressed, at which time it begins to scroll to the right. I "guestimated" that the letters HRDLU, despite their being on the "2nd" row, would be reached faster than if they were at the right end of the "1st" row. And see my previous posts regarding the reason for including the "." among the earliest symbols to be reached.
Attachments
XVkbd-1switchB.zip
Delete false Zip, and version designation &quot;-1switchB&quot;
(2.74 KiB) Downloaded 619 times
XVkbd-1switchB.png
View of keyboard B.
(14.52 KiB) Downloaded 1731 times

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Alternate Letter Frequency Keyboard for xvkbd & radar/navbar

#104 Post by ETP »

Hi mikeslr,
That looks fine. I would not worry about AltGr as the French will be using their own k/b layout and we Brits make little use of the euro symbol € :lol:
I have found that the meta keys do not work with jwm but IIRC Tom did warn that not all features of Xvkbd would work with some WMs.
My only suggestion is (If possible) you might like to swap the positions of the Focus and Meta keys on the bottom line as it is a pain
waiting for the cursor to traverse to what will probabably be a frequently used key.
ps
I sent you a PM on the 28th April which you do not appear to have accessed.
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Regarding modification of the xvkbd keyboard

#105 Post by mikeslr »

Hi ETP,

I was going to swap the Focus and Meta Key per your request, and will be happy to if you still want that. But subscribing to the philosophy “Give a man a fish and you feed him one day. Teach a man to fish and you feed him for a life time

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Regarding modification of the xvkbd keyboard

#106 Post by ETP »

Hi mikeslr,

Thanks for posting your detailed description of how to modify Xvkbd. It will be of benefit to anyone wanting to go down this route. One minor point of clarification however concerning:
#include "XVkbd-common"
I'm not sure why it begins with the # sign.

Once you “un-comment
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
mikeslr
Posts: 3890
Joined: Mon 16 Jun 2008, 21:20
Location: 500 seconds from Sol

Can Word-Completition become functional?

#107 Post by mikeslr »

Hi ETP and All,
Word Completion: type a couple of letters and then insert into your text from a list the word or phrase beginning with those letters. For someone limited to waiting for a mouse-cursor following a prescribed pattern to reach each letter and typing one letter at a time, word completion should be of great value. But currently it isn't.
Unless, of course, I've missed something.
First problem: turning xvkbd's word-completion on. I can find no way for it to be turned on automatically when xvkbd starts. To use it, it must be turned on each time.
Second problem: To turn it on, you have to position the mouse-cursor on the MainMenu button (which bears the label “xvkbd
Attachments
Word-Completion-Window.png
Ameliorating one problem with Word-Completion
(139.31 KiB) Downloaded 762 times

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

RE: Can Word-Completition become functional?

#108 Post by ETP »

Hi mikeslr,

I think you may have missed my 2 posts dated 21st April which solved issues 1 to 3 inclusive.

The fourth and fifth problems are the reasons why I have only ever perceived word-completion as useful for really long words or hyphenated phrases. Only then does it become a time saver. It was also the main rational for including Chromium and having Google default to voice search in TPWNN.

LibreOffice, (In sfs form perhaps?) may be of more use but Google have recently purchased a Quantum computer and appear to be working on web based voice dictation for all. In effect a sort of on-line “Dragon Dictate
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

Eviacam 1.6.0 dotpet for Precise based pups.

#109 Post by ETP »

Hi All,

I do not yet know whether or not this is needed, but a pet (18.5MB) is now available on my server. I have tested it on a number of Precise based pups but only with JWM. Someone may wish to try it with other WMs.

When using head mouse control, it is best to avoid having icons or panels in the centre of the screen to avoid unintentional mouse triggers. A limited number around the periphery of the screen seems to work best.

It works particularly well with Xbmc-Frodo. Have fun; a “teaser
Attachments
Webcamera-Mouse-Pup.jpg
Testing with Precise 5.6
(50.79 KiB) Downloaded 1020 times
Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#110 Post by 8-bit »

In one of my old Atari magazines, I have a word processor/ communicator that is joystick driven.
It shows a number of common words that can be selected to place in the document and inserts a space after each word.
Also partial words can be used as in one word being part of a longer word.
It is written in Atari Basic. But could possibly be programmed in another programming language.
What would make it nice is one would not have to type out words letter by letter.

Now for the bad news. I am no great programmer and the conversion could take a fair amount of time.

Do you know of anything like it ready made?
Any interest in a tried conversion of the program? (Not even started yet!)

Post Reply