Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 16 Apr 2014, 04:49
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Drop-down on-screen keyboard howto
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [11 Posts]  
Author Message
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: 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)
xvkbd.gz
Description  here is a copy of the executable - just gunzip it in /usr/bin
gz

 Download 
Filename  xvkbd.gz 
Filesize  31.17 KB 
Downloaded  705 Time(s) 
osk.png
 Description   
 Filesize   62.08 KB
 Viewed   2032 Time(s)

osk.png


_________________
Web Programming - Pet Packaging 100 & 101

Last edited by technosaurus on Sun 18 Apr 2010, 10:31; edited 1 time in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: 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. Smile
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
View user's profile Send private message Visit poster's website 
lwill


Joined: 13 Jun 2008
Posts: 173
Location: City Of Lights

PostPosted: 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
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: 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?

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: Sat 17 Apr 2010, 12:48    Post subject:  

technosaurus
You're right

Thanks a lot
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Sat 17 Apr 2010, 15:24    Post subject:  

oooh ziggy

Nice!



Looking forward to the next DuDE Very Happy

Cheers

edit: did you mean focus with xvkbd? That is working for me too. Smile

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: 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..... Cool 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
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5561
Location: Valåmoen, Norway

PostPosted: 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
View user's profile Send private message Visit poster's website 
technosaurus


Joined: 18 May 2008
Posts: 4133

PostPosted: 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

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [11 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0594s ][ Queries: 12 (0.0051s) ][ GZIP on ]