Reply
Thread Tools
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#1
I posted this in another thread, but thought I would put it here along with some modifications I made. I changed a few colors and now the return key works in all gtk apps so no more hildon-input-method.

edit: Caps, shift, ctrl all working (ctrl only sends lower case for now)

I use these styles for the windows:
Code:
Style *vk* Title, NeverFocus, StaysOnTop
Style *sym* Title, NeverFocus, StaysOnTop
And launch the keyboard with this command:
Code:
Module FvwmButtons vk -g 420x170+348+298
Code:
DestroyFunc sendfakekey
AddToFunc sendfakekey
+ I Test (EnvMatch fakectrl 1) FakeKeypress modifiers 8 press $0 modifiers -8
+ I TestRc (NoMatch) Test (EnvMatch fakecaps 1) FakeKeypress modifiers 7 press $0 modifiers -7
+ I TestRc (NoMatch) Test (EnvMatch fakeshift 1) FakeKeypress modifiers 7 press $0 modifiers -7
+ I TestRc (NoMatch) FakeKeypress press $0
+ I Test (EnvMatch fakectrl 1) setfakectrl
+ I Test (EnvMatch fakeshift 1) setfakeshift

DestroyFunc setfakecaps
AddToFunc setfakecaps
+ I Test (EnvMatch fakecaps 1) SetEnv fakecaps 0
+ I TestRc (NoMatch) SetEnv fakecaps 1
+ I Test (EnvMatch fakecaps 1) SendToModule vk ChangeButton caps Title CP
+ I TestRc (NoMatch) SendToModule vk ChangeButton caps Title cp

DestroyFunc setfakectrl
AddToFunc setfakectrl
+ I Test (EnvMatch fakectrl 1) SetEnv fakectrl 0
+ I TestRc (NoMatch) SetEnv fakectrl 1
+ I Test (EnvMatch fakectrl 1) SendToModule vk ChangeButton ctrl Title ^
+ I TestRc (NoMatch) SendToModule vk ChangeButton ctrl Title "ct"

DestroyFunc setfakeshift
AddToFunc setfakeshift
+ I Test (EnvMatch fakeshift 1) SetEnv fakeshift 0
+ I TestRc (NoMatch) SetEnv fakeshift 1
+ I Test (EnvMatch fakeshift 1) SendToModule vk ChangeButton shift Title SH
+ I TestRc (NoMatch) SendToModule vk ChangeButton shift Title sh

Module FvwmButtons: vk
#*vk: Geometry 720x400
*vk: ButtonGeometry 30x34
*vk: Rows 5
*vk: Columns 14
*vk: BoxSize fixed
*vk: Font "xft:Tahoma:antialias=True:pixelsize=24"
*vk: Fore black
*vk: Back white

*vk: (2x1, fore white, back red, Title ">>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (1x1, Title "1", Action (Mouse 1) FakeKeypress press 1)
*vk: (1x1, Title "2", Action (Mouse 1) FakeKeypress press 2)
*vk: (1x1, Title "3", Action (Mouse 1) FakeKeypress press 3)
*vk: (1x1, Title "4", Action (Mouse 1) FakeKeypress press 4)
*vk: (1x1, Title "5", Action (Mouse 1) FakeKeypress press 5)
*vk: (1x1, Title "6", Action (Mouse 1) FakeKeypress press 6)
*vk: (1x1, Title "7", Action (Mouse 1) FakeKeypress press 7)
*vk: (1x1, Title "8", Action (Mouse 1) FakeKeypress press 8)
*vk: (1x1, Title "9", Action (Mouse 1) FakeKeypress press 9)
*vk: (1x1, Title "0", Action (Mouse 1) FakeKeypress press 0)
*vk: (2x1, fore white, back red, Title "<<<", Action (Mouse 1) FakeKeypress press BackSpace)

*vk: (2x1, fore white, back red, Title ">>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (1x1, Title "q", Action (Mouse 1) sendfakekey q)
*vk: (1x1, Title "w", Action (Mouse 1) sendfakekey w)
*vk: (1x1, Title "e", Action (Mouse 1) sendfakekey e)
*vk: (1x1, Title "r", Action (Mouse 1) sendfakekey r)
*vk: (1x1, Title "t", Action (Mouse 1) sendfakekey t)
*vk: (1x1, Title "y", Action (Mouse 1) sendfakekey y)
*vk: (1x1, Title "u", Action (Mouse 1) sendfakekey u)
*vk: (1x1, Title "i", Action (Mouse 1) sendfakekey i)
*vk: (1x1, Title "o", Action (Mouse 1) sendfakekey o)
*vk: (1x1, Title "p", Action (Mouse 1) sendfakekey p)
*vk: (2x1, fore white, back blue, Title "RTN", Action (Mouse 1) FakeKeypress press KP_Enter)

*vk: (2x1, fore white, back blue, Id caps, Title "cp", Action (Mouse 1) setfakecaps)
*vk: (1x1, Title "a", Action (Mouse 1) sendfakekey a)
*vk: (1x1, Title "s", Action (Mouse 1) sendfakekey s)
*vk: (1x1, Title "d", Action (Mouse 1) sendfakekey d)
*vk: (1x1, Title "f", Action (Mouse 1) sendfakekey f)
*vk: (1x1, Title "g", Action (Mouse 1) sendfakekey g)
*vk: (1x1, Title "h", Action (Mouse 1) sendfakekey h)
*vk: (1x1, Title "j", Action (Mouse 1) sendfakekey j)
*vk: (1x1, Title "k", Action (Mouse 1) sendfakekey k)
*vk: (1x1, Title "l", Action (Mouse 1) sendfakekey l)
*vk: (1x1, Title ":", Action (Mouse 1) FakeKeypress press colon)
*vk: (1x1, Title "/", Action (Mouse 1) FakeKeypress press slash)
*vk: (1x1, Title "@", Action (Mouse 1) FakeKeypress press at)

*vk: (2x1, fore white, back green, Id shift, Title "sh", Action (Mouse 1) setfakeshift)
*vk: (1x1, Title "z", Action (Mouse 1) sendfakekey z)
*vk: (1x1, Title "x", Action (Mouse 1) sendfakekey x)
*vk: (1x1, Title "c", Action (Mouse 1) sendfakekey c)
*vk: (1x1, Title "v", Action (Mouse 1) sendfakekey v)
*vk: (1x1, Title "b", Action (Mouse 1) sendfakekey b)
*vk: (1x1, Title "n", Action (Mouse 1) sendfakekey n)
*vk: (1x1, Title "m", Action (Mouse 1) sendfakekey m)
*vk: (1x1, Title ",", Action (Mouse 1) FakeKeypress press comma)
*vk: (1x1, Title ".", Action (Mouse 1) FakeKeypress press period)
*vk: (1x1, Title "'", Action (Mouse 1) FakeKeypress press quoteright)
*vk: (1x1, Title "\"", Action (Mouse 1) FakeKeypress press quotedbl)
*vk: (1x1, Title "-", Action (Mouse 1) FakeKeypress press minus)

#*vk: (1x1, fore white, back blue, Id caps, Title "c", Action (Mouse 1) setfakecaps)
*vk: (2x1, fore white, back black, Id ctrl, Title "ct", Action (Mouse 1) setfakectrl)
#*vk: (2x1, fore white, back red, Title ">>>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (9x1, Title " ", Action (Mouse 1) FakeKeypress press space)
*vk: (1x1, back red, Title " ", Action "Module FvwmButtons sym -g 250x110+0+302")

Module FvwmButtons: sym
#*sym: Geometry 720x400
*sym: ButtonGeometry 30x34
*sym: Rows 3
*sym: Columns 8
*sym: BoxSize fixed
*sym: Font "xft:Tahoma:antialias=True:pixelsize=24"
*sym: Fore white
*sym: Back black

*sym: (1x1, Title "!", Action (Mouse 1) FakeKeypress press exclam)
*sym: (1x1, Title "#", Action (Mouse 1) FakeKeypress press numbersign)
*sym: (1x1, Title "$", Action (Mouse 1) FakeKeypress press dollar)
*sym: (1x1, Title "\%", Action (Mouse 1) FakeKeypress press percent)
*sym: (1x1, Title "^", Action (Mouse 1) FakeKeypress press asciicircum)
*sym: (1x1, Title "&", Action (Mouse 1) FakeKeypress press ampersand)
*sym: (1x1, Title "*", Action (Mouse 1) FakeKeypress press asterisk)
*sym: (1x1, Title "_", Action (Mouse 1) FakeKeypress press underscore)

*sym: (1x1, Title "+", Action (Mouse 1) FakeKeypress press plus)
*sym: (1x1, Title "=", Action (Mouse 1) FakeKeypress press equal)
*sym: (1x1, Title ";", Action (Mouse 1) FakeKeypress press semicolon)
*sym: (1x1, Title "?", Action (Mouse 1) FakeKeypress press question)
*sym: (1x1, Title "\\", Action (Mouse 1) FakeKeypress press backslash)
*sym: (1x1, Title "`", Action (Mouse 1) FakeKeypress press quoteleft)
*sym: (1x1, Title "~", Action (Mouse 1) FakeKeypress press asciitilde)
*sym: (1x1, Title "|", Action (Mouse 1) FakeKeypress press bar)

*sym: (1x1, Title "(", Action (Mouse 1) FakeKeypress press parenleft)
*sym: (1x1, Title ")" Action (Mouse 1) FakeKeypress press parenright)
*sym: (1x1, Title "<", Action (Mouse 1) FakeKeypress press less)
*sym: (1x1, Title ">", Action (Mouse 1) FakeKeypress press greater)
*sym: (1x1, Title "[", Action (Mouse 1) FakeKeypress press bracketleft)
*sym: (1x1, Title "]", Action (Mouse 1) FakeKeypress press bracketright)
*sym: (1x1, Title "{", Action (Mouse 1) FakeKeypress press braceleft)
*sym: (1x1, Title "}", Action (Mouse 1) FakeKeypress press braceright)

Last edited by coffeedrinker; 2008-08-09 at 15:48.
 
qole's Avatar
Moderator | Posts: 7,109 | Thanked: 8,820 times | Joined on Oct 2007 @ Vancouver, BC, Canada
#2
So the question is: can you use this keyboard in anything other than fvwm? Can you install something that makes this work elsewhere?
__________________
qole.org --- twitter --- Easy Debian wiki page
Please don't send me a private message, post to the appropriate thread.
Thank you all for your donations!
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#3
It can only be used in fvwm. There are a few of us around here that use it, but I'm not sure who all we are.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#4
I'm one, a little. Still working (intermittently) on the goal of tossing up a complete ready-to-go .deb somewhere, but I do actually use it as well as hacking on it.
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#5
I don't know anything about making debs so I just compile all must stuff to /usr/local/ and tar it up. I'm always tweaking away at my config files, thinking of something that will make it just a bit better.

I'm pretty satisfied with what I have now, now that the I can once and for all forget about the hildon keyboard. Links suffices for my browsing needs, so I've turned off browserd now too.
 
Benson's Avatar
Posts: 4,930 | Thanked: 2,272 times | Joined on Oct 2007
#6
Well, I was (and am, for normal use) using Debian xvkbd, though I'm fiddling a bit with your keyboard; I use my own rxvt build. I've got a build of FVWM 2.5.26 (Thanks, qwerty12!) around that I haven't even installed yet, but I'm thinking I'll at least try patching for translucency and building my own before I finalize things for packaging.

And tons of config tweaking. One tip: Add an extra title-bar button with a menu to select from the three buttons, e.g.:
Code:
AddToMenu "Input" "Input " Title
+              "Button 1 " Exec exec xmodmap -e 'pointer = 1 2 3' 
+              "Button 2 " Exec exec xmodmap -e 'pointer = 2 3 1' 
+              "Button 3 " Exec exec xmodmap -e 'pointer = 3 1 2'm
+              "" Nop 
+              "Xvkbd" Exec exec xvkbd &
Code:
Mouse 0         3       A       Menu Input Nop
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#7
That's a good idea. I just moved my title bar to the left side to give more vertical room.
 
Posts: 168 | Thanked: 51 times | Joined on Jun 2007
#8
Well, I got caps working! I haven't decided yet if I'll bother with a ctrl key or not. Here the new code:

Known issue: If you close the window with caps set it will come up in the wrong mode. Same thing if you have more than one keyboard running. Just click it and it will fix itself.

Code:
DestroyFunc sendfakekey
AddToFunc sendfakekey
#+ I Test (EnvIsSet fakectrl) FakeKeypress modifiers 8 press $0 modifiers -8
+ I Test (EnvMatch fakecaps 1) FakeKeypress modifiers 7 press $0 modifiers -7
+ I Test (EnvMatch fakecaps 0) FakeKeypress press $0

DestroyFunc setfakecaps
AddToFunc setfakecaps
+ I Test (EnvMatch fakecaps 1) SetEnv fakecaps 0
+ I TestRc (NoMatch) SetEnv fakecaps 1
+ I Test (EnvMatch fakecaps 1) SendToModule vk ChangeButton caps Title C
+ I TestRc (NoMatch) SendToModule vk ChangeButton caps Title c

AddToFunc setfakectrl
+ I Test (EnvMatch fakectrl 1) SetEnv fakectrl 0
+ I TestRc (NoMatch) SetEnv fakectrl 1
+ I Test (EnvMatch fakectrl 1) SendToModule vk ChangeButton ctrl Title C
+ I TestRc (NoMatch) SendToModule vk ChangeButton ctrl Title c

Module FvwmButtons: vk
#*vk: Geometry 720x400
*vk: ButtonGeometry 30x34
*vk: Rows 5
*vk: Columns 12
*vk: BoxSize fixed
*vk: Font "xft:Tahoma:antialias=True:pixelsize=24"
*vk: Fore black
*vk: Back white

#*vk: (2x1, fore white, back red, Title ">>>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (1x1, Title "1", Action (Mouse 1) FakeKeypress press 1)
*vk: (1x1, Title "2", Action (Mouse 1) FakeKeypress press 2)
*vk: (1x1, Title "3", Action (Mouse 1) FakeKeypress press 3)
*vk: (1x1, Title "4", Action (Mouse 1) FakeKeypress press 4)
*vk: (1x1, Title "5", Action (Mouse 1) FakeKeypress press 5)
*vk: (1x1, Title "6", Action (Mouse 1) FakeKeypress press 6)
*vk: (1x1, Title "7", Action (Mouse 1) FakeKeypress press 7)
*vk: (1x1, Title "8", Action (Mouse 1) FakeKeypress press 8)
*vk: (1x1, Title "9", Action (Mouse 1) FakeKeypress press 9)
*vk: (1x1, Title "0", Action (Mouse 1) FakeKeypress press 0)
*vk: (2x1, fore white, back red, Title "<<<", Action (Mouse 1) FakeKeypress press BackSpace)

#*vk: (2x1, fore white, back red, Title ">>>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (1x1, Title "q", Action (Mouse 1) sendfakekey q)
*vk: (1x1, Title "w", Action (Mouse 1) sendfakekey w)
*vk: (1x1, Title "e", Action (Mouse 1) sendfakekey e)
*vk: (1x1, Title "r", Action (Mouse 1) sendfakekey r)
*vk: (1x1, Title "t", Action (Mouse 1) sendfakekey t)
*vk: (1x1, Title "y", Action (Mouse 1) sendfakekey y)
*vk: (1x1, Title "u", Action (Mouse 1) sendfakekey u)
*vk: (1x1, Title "i", Action (Mouse 1) sendfakekey i)
*vk: (1x1, Title "o", Action (Mouse 1) sendfakekey o)
*vk: (1x1, Title "p", Action (Mouse 1) sendfakekey p)
*vk: (2x1, fore white, back blue, Title "RTN", Action (Mouse 1) FakeKeypress press KP_Enter)

#*vk: (2x1, fore white, back blue, Id caps, Title "cap", Action (Mouse 1) setfakecaps)
*vk: (1x1, Title "a", Action (Mouse 1) sendfakekey a)
*vk: (1x1, Title "s", Action (Mouse 1) sendfakekey s)
*vk: (1x1, Title "d", Action (Mouse 1) sendfakekey d)
*vk: (1x1, Title "f", Action (Mouse 1) sendfakekey f)
*vk: (1x1, Title "g", Action (Mouse 1) sendfakekey g)
*vk: (1x1, Title "h", Action (Mouse 1) sendfakekey h)
*vk: (1x1, Title "j", Action (Mouse 1) sendfakekey j)
*vk: (1x1, Title "k", Action (Mouse 1) sendfakekey k)
*vk: (1x1, Title "l", Action (Mouse 1) sendfakekey l)
*vk: (1x1, Title ":", Action (Mouse 1) FakeKeypress press colon)
*vk: (1x1, Title "/", Action (Mouse 1) FakeKeypress press slash)
*vk: (1x1, Title "@", Action (Mouse 1) FakeKeypress press at)

#*vk: (2x1, Title "ctl", Action (Mouse 1) SetEnv fakectrl 1)
*vk: (1x1, Title "z", Action (Mouse 1) sendfakekey z)
*vk: (1x1, Title "x", Action (Mouse 1) sendfakekey x)
*vk: (1x1, Title "c", Action (Mouse 1) sendfakekey c)
*vk: (1x1, Title "v", Action (Mouse 1) sendfakekey v)
*vk: (1x1, Title "b", Action (Mouse 1) sendfakekey b)
*vk: (1x1, Title "n", Action (Mouse 1) sendfakekey n)
*vk: (1x1, Title "m", Action (Mouse 1) sendfakekey m)
*vk: (1x1, Title ",", Action (Mouse 1) FakeKeypress press comma)
*vk: (1x1, Title ".", Action (Mouse 1) FakeKeypress press period)
*vk: (1x1, Title "'", Action (Mouse 1) FakeKeypress press quoteright)
*vk: (1x1, Title "\"", Action (Mouse 1) FakeKeypress press quotedbl)
*vk: (1x1, Title "-", Action (Mouse 1) FakeKeypress press minus)

*vk: (1x1, fore white, back blue, Id caps, Title "c", Action (Mouse 1) setfakecaps)
*vk: (2x1, fore white, back red, Title ">>>", Action (Mouse 1) FakeKeypress press Tab)
*vk: (8x1, Title " ", Action (Mouse 1) FakeKeypress press space)
*vk: (1x1, back red, Title " ", Action "Module FvwmButtons sym -g 250x110+0+302")

Module FvwmButtons: sym
#*sym: Geometry 720x400
*sym: ButtonGeometry 30x34
*sym: Rows 3
*sym: Columns 8
*sym: BoxSize fixed
*sym: Font "xft:Tahoma:antialias=True:pixelsize=24"
*sym: Fore white
*sym: Back black

*sym: (1x1, Title "!", Action (Mouse 1) FakeKeypress press exclam)
*sym: (1x1, Title "#", Action (Mouse 1) FakeKeypress press numbersign)
*sym: (1x1, Title "$", Action (Mouse 1) FakeKeypress press dollar)
*sym: (1x1, Title "\%", Action (Mouse 1) FakeKeypress press percent)
*sym: (1x1, Title "^", Action (Mouse 1) FakeKeypress press asciicircum)
*sym: (1x1, Title "&", Action (Mouse 1) FakeKeypress press ampersand)
*sym: (1x1, Title "*", Action (Mouse 1) FakeKeypress press asterisk)
*sym: (1x1, Title "_", Action (Mouse 1) FakeKeypress press underscore)

*sym: (1x1, Title "+", Action (Mouse 1) FakeKeypress press plus)
*sym: (1x1, Title "=", Action (Mouse 1) FakeKeypress press equal)
*sym: (1x1, Title ";", Action (Mouse 1) FakeKeypress press semicolon)
*sym: (1x1, Title "?", Action (Mouse 1) FakeKeypress press question)
*sym: (1x1, Title "\\", Action (Mouse 1) FakeKeypress press backslash)
*sym: (1x1, Title "`", Action (Mouse 1) FakeKeypress press quoteleft)
*sym: (1x1, Title "~", Action (Mouse 1) FakeKeypress press asciitilde)
*sym: (1x1, Title "|", Action (Mouse 1) FakeKeypress press bar)

*sym: (1x1, Title "(", Action (Mouse 1) FakeKeypress press parenleft)
*sym: (1x1, Title ")" Action (Mouse 1) FakeKeypress press parenright)
*sym: (1x1, Title "<", Action (Mouse 1) FakeKeypress press less)
*sym: (1x1, Title ">", Action (Mouse 1) FakeKeypress press greater)
*sym: (1x1, Title "[", Action (Mouse 1) FakeKeypress press bracketleft)
*sym: (1x1, Title "]", Action (Mouse 1) FakeKeypress press bracketright)
*sym: (1x1, Title "{", Action (Mouse 1) FakeKeypress press braceleft)
*sym: (1x1, Title "}", Action (Mouse 1) FakeKeypress press braceright)

Last edited by coffeedrinker; 2008-08-07 at 17:31.
 
Reply

Tags
fvwm


 
Forum Jump


All times are GMT. The time now is 16:45.