Need on-screen keyboard with mouse functions

A home for all kinds of Puppy related projects
Message
Author
User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#81 Post by SFR »

mikeslr wrote:The problem is that they are dependent on the current screen resolution. That will vary from one installation to another, and one of our objectives is to present the user with something which will "just work: no fiddling necessary." I've spent several hours googling for a way to determine, separately, the current width and height of display. Once those are determined, they can be applied to a formula to set xvkbd's width and height relative to the screen's width and height.
The "solutions" I found either required installing python, or programming in C or didn't work. I'd prefer something which could be used by a "stock" puppy. I'm using wary 5.5 as my test bed. Every "stock" puppy already has built-in tools to make such determination as they come with several applications which report current screen dimensions. Just not in a format I know how to manipulate.
Hey Mikeslr

I'm using this all the time (also in Radar to place its window):

Code: Select all

read MAXX MAXY <<< `xwininfo -root | awk 'NR>=8&&NR<=9 {print $2}'`
echo "Width="$MAXX "Height="$MAXY
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

Script to get current screen width and height

#82 Post by mikeslr »

Thanks SFR.

It works in precise, which I'm currently running. Will try next in Wary. Works in wary. Next to remember how to write Bash. Real-life tomorrow. Maybe by Woden's Tag.

But also wanted to create a post for future google searchers of a soluiton.

mikesLr
Last edited by mikeslr on Tue 09 Apr 2013, 01:07, edited 2 times in total.

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

xvkbd's Word Completion & Abiword plugins

#83 Post by mikeslr »

Hi All,

Changed to the "small" version of the word list by downloading it from the ubuntu webpage I mentioned a couple of posts back. Downloaded and unpacked the .deb; moved dict folder to usr/share and renamed the within text file "words" --without the quotes, after deleting the older larger word file.
Word completion with the smaller list seems to work better than I expected. Once turned on by clicking xvkbd on the keyboard lower left corner and selecting word completion, a box appears on the screen. As you type using xvkbd's keyboard words beginning with the letters type appear in the box. All that's necessary to complete the word being typed is to click the desired word in the box. Of course, this means the mouse cursor has to leave the keyboard, but the target application remains in xvkbd's focus and doesn't have to be re-established. I'm not certain that it is less productive than LibreOffice's automatic word completion which seems to insist on the similar word I first typed when I actually want to use a different word based on the same root. If the word you want isn't shown, but a similar word is, you can click on the similar word and then backspace/delete as necessary. Backspacing, however, confuses xvkbd. When you begin typing letters again "Word completion" sees it as a new word and will continue to do so until you click the space bar.
But there's another problem to consider. The word completion module uses display space. It getting very crowed. I wonder how xvkbd handles multiple virtual desktops, something I've always done without.
Before experimenting with xvkbd's word completion I looked to see if Abiword might have a plugin giving it LibreOffice's word-completion functionality. It didn't. But that lead me to test musher0's abiword 2.9.2, http://www.murga-linux.com/puppy/viewto ... 142#648142. It wouldn't run in wary --missing libs-- but probably will in precise derivatives. So I next tried technosaurus's 2.8.2, http://www.murga-linux.com/puppy/viewto ... 817#392817, which had "all plugins." In wary, it required ttuuxxx's wv pet. http://www.murga-linux.com/puppy/viewto ... 086#393086. Among the tools included, and callable via the keyboard, are google and wikpedia modules. After a typed word is selected (Shift-direction key) Alt-t (=Menu>Tools) directional key to selection on menu, Enter to select it, the default browser will open and do either a google or wikipedia search of the selected word.

mikesLr

p.s. Just re-read greengeek's post above. Moving "controls" to the top of the display would work well for everyone who wasn't habituated to expect the keyboard to be below the target program, which means almost everyone.

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

Virtual desktop problems

#84 Post by mikeslr »

Hi All,

Since I find it easy to move open windows around, minimize them, and click on minimized ones to re-display them, I've never employed more than one desktop. But above I mentioned the problem about declining available display space and wondered if employing more than one desktop might help if opening more than one target application was desired.
Tried switching to a second desktop. Neither xvkbd nor radar were present. Clicking xvkbd's menu listing opened it. To make it easier to test in various pups, I had created a pet of radar, giving it a menu entry. Clicking that entry did nothing. If I recall correctly, SFR built radar so that it would first test if an instance was already running, and on finding that condition, exit. My pet-with-menu-entry is just to facilitate testing. As I mentioned, either radar or NavBar will most likely be started on bootup. A user will have little reason to either turn it off, or try to start a second instance of it's running: except when employing multiple virtual desktops. So I think it safe to eliminate the "multiple instance test."

mikeslr

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

Release candidate for testing.

#85 Post by ETP »

Hi All,

Changes kindly made by SFR to Radar have enabled me to progress to rc1.

Changes since beta 0.2

1. The pup is now screen-resolution agnostic.

2. Simplified set up procedure. (As a result of item one)

3. Full sized on-screen keyboard now possible for easier navigation. Issue ALT+F10 command from new custom Radar menu. (This is a toggle command)

4. Issue page up/page down commands from this new menu together with “return
Attachments
image-2.png
(150.43 KiB) Downloaded 634 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
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#86 Post by greengeek »

Added a new version of SwitchPup532_Communicator here:
http://murga-linux.com/puppy/viewtopic.php?t=85466

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

Release candidate for testing.

#87 Post by ETP »

Hi All,

RC2 is now available on http://www.mydrive.ch

The changes are mainly cosmetic in order to distinguish it from the Magoo ISOs.
It does however include SFR’s “OneSwitch-1.0.pet
Attachments
rc2.jpg
(78.6 KiB) Downloaded 540 times
chromium.png
(44.91 KiB) Downloaded 631 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
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

The Pup With No Name ISO (tpwnn_rc2.iso)

#88 Post by ETP »

Shot of Xvkbd being used to populate its "words" file.
Attachments
Full_screen_kb.jpg
(53.4 KiB) Downloaded 588 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]

standard7452
Posts: 20
Joined: Mon 25 Feb 2013, 23:11

#89 Post by standard7452 »

Hello,

Sorry for my absence.

I wanted to let you know that I am still in the process of manufacturing the switch for the pause/break key to work with the tools.

I will post more later today when I actually get to my house.

Thank You!

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

Keyboard Surgery

#90 Post by ETP »

Hi Will,

There is a possible alternative to keyboard surgery that you might like to consider in the form of a solenoid. The type I have in mind is to be found in the standard “Ding Dong
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

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]

Post Reply