| Author |
Message |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Fri 16 Apr 2010, 15:23 Post subject:
Drop-down on-screen keyboard howto Subject description: (to be integrated into next Ptray) |
|
If you have a tablet PC, don't have a keyboard handy, or need to be able to operate one-handed using only a mouse; having an always available on-screen keyboard can be really handy. It is really easy with jwm in Puppy.
You will need an on-screen keyboard program for this to work - I have included a simple one called xvkbd, but have tested it with gtkeyboard as well.
add this to a standard puppy's /root/.jwmrc-tray for a dropdown keyboard (right after the <JWM> tag)
<Tray autohide="true" halign="center" valign="top"><Swallow name="xvkbd">xvkbd -no-keypad</Swallow></Tray>
remove -no-keypad if you want the number pad
to get a pop-UP menu instead (for macPup style with a top task bar), just change valign="top" to valign="bottom"
(may interfere with ptray - fixed by setting halign= or valign to a different locations)
| Description |
here is a copy of the executable - just gunzip it in /usr/bin
|

Download |
| Filename |
xvkbd.gz |
| Filesize |
31.17 KB |
| Downloaded |
594 Time(s) |
| Description |
|
| Filesize |
62.08 KB |
| Viewed |
1814 Time(s) |

|
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
Last edited by technosaurus on Sun 18 Apr 2010, 10:31; edited 1 time in total
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Fri 16 Apr 2010, 17:20 Post subject:
|
|
technosaurus
Cool feature
I will integrate with the next Ptray
Thank you
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sat 17 Apr 2010, 08:03 Post subject:
|
|
Hi again
Your work gave me an idea.
Since xvkbd worked well Ptray, I also added a calculator.
This technique can be used for several tasks. notepad, filesearch.....
I tried xpad and fileedit, but they didn't work well. Then I made my own test-notepad, but jwm wouldn't swallow it. Have you solved an issue like this before ??? | Code: | #!/bin/sh
export Pnote='
<window width-request="300" height-request="200">
<edit><variable>PAD</variable><input file>/tmp/pnote</input></edit>
<action signal="hide">echo $PAD > /tmp/pnote</action>
</window>'
gtkdialog3 -p Pnote |
Thanks
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
lwill

Joined: 13 Jun 2008 Posts: 168 Location: City Of Lights
|
Posted: Sat 17 Apr 2010, 09:43 Post subject:
|
|
Quite some time ago I made a small button for the tray to switch the left and right mouse buttons for a "ProGear" tablet I was playing with using 2.17.
http://www.murga-linux.com/puppy/viewtopic.php?p=208907#208907
Since with a touch screen you cannot "right click" it worked well, but was very simple. I am sure some one could make a much better looking one than I did. I still have the code somewhere if you think it would be a useful.
(I actually drug it out the other day and got it to work as a baby video monitor. Pretty slow with only "b" wireless, but worked)
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Sat 17 Apr 2010, 12:24 Post subject:
|
|
@Zigbert: name="xvkbd" (for instance) has to be the correct name
top or pprocess may give you the proper name (I use a gtk1 app called gps) - gtkdialog has the ability to change these, correct?
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sat 17 Apr 2010, 12:48 Post subject:
|
|
technosaurus
You're right
Thanks a lot
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sat 17 Apr 2010, 13:58 Post subject:
|
|
| Code: | #!/bin/sh
#set gtk-theme
echo 'style "menu" {
font_name = "DejaVu sans italic 14"
bg[NORMAL] = "#FFF4AF"
base[NORMAL] = "#FFF4AF"
text[NORMAL] = "#222222"
}
class "*t*" style "menu"' > /tmp/gtkrc
export GTK2_RC_FILES=/tmp/gtkrc:/root/.gtkrc-2.0
[ ! -d $HOME/.stardust ] && mkdir $HOME/.stardust
export Pnote='
<window width-request="330" height-request="600">
<edit left-margin="10"><variable>PAD</variable><input file>'$HOME'/.stardust/pnote</input></edit>
<action signal="leave-notify-event">echo "$PAD" > $HOME/.stardust/pnote</action>
</window>'
gtkdialog3 -p Pnote --name=pnote |
_________________ Stardust resources
|
|
Back to top
|
|
 |
01micko

Joined: 11 Oct 2008 Posts: 7017 Location: qld
|
Posted: Sat 17 Apr 2010, 15:24 Post subject:
|
|
oooh ziggy
Nice!
Looking forward to the next DuDE
Cheers
edit: did you mean focus with xvkbd? That is working for me too.
_________________ keep the faith .. 
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Sun 18 Apr 2010, 01:53 Post subject:
|
|
Mick
Yes, everything works normally when you run Pnote 'the normal way', but the intention here is much cooler..... To run it inside a autohidden jwm-tray. - then I get the focus bug.....
Though, I have managed to build some kind of workaround
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5240 Location: Valåmoen, Norway
|
Posted: Wed 21 Apr 2010, 14:46 Post subject:
|
|
I am not able to change keyboard layout (I want norwegian) as described in the manual. Is it the compile, Puppy, me, ???....
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
technosaurus

Joined: 18 May 2008 Posts: 3843
|
Posted: Wed 21 Apr 2010, 16:57 Post subject:
|
|
There were additional language type files included in the source, but Puppy is missing some templates from imake, so I built just the binary using a gcc one-liner with parameters taken from the included imake files
Those files may need to go in /usr/shared/??? or they may have compiled in, but it is worth downloading the source for the documentation, since there are quite a few optional parameters.
... usually the parameter would be something like
-DATADIR=\"/usr/share/xvkbd\"
however I do not recall needing to add that to get it to compile
_________________ Puppy Web Desktop Now with pet packages - Pet Packaging 100 & 101
|
|
Back to top
|
|
 |
|