Discussion:
[xmonad] How to use virtual/on-screen keyboard in Xmonad
Jakob Schöttl
2015-12-31 23:09:29 UTC
Permalink
Hello,

I would like to use Xmonad to set up a custom, very restricted desktop
environment on a Raspberry Pi with a touch screen.

Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence

Some of them work with some other programs. But when it works, it's
still buggy:

- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus
(super+j)
- doesn't work at all with some programs

Is there a way to get virtual keyboards work with Xmonad, reliably and
for all programs?

Thank you!

Jakob
Bogdan Sinitsyn
2015-12-31 23:25:28 UTC
Permalink
Post by Jakob Schöttl
Hello,
I would like to use Xmonad to set up a custom, very restricted desktop
environment on a Raspberry Pi with a touch screen.
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
Some of them work with some other programs. But when it works, it's
- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus
(super+j)
- doesn't work at all with some programs
Is there a way to get virtual keyboards work with Xmonad, reliably and
for all programs?
Thank you!
Jakob
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
It this virtual keyboard _NET_WM_WINDOW_TYPE_DOCK or smth like this? If not,
it may be useful to make it be of this type.
--
Bogdan Sinitsyn
Jakob Schöttl
2016-01-01 03:36:58 UTC
Permalink
Post by Bogdan Sinitsyn
Post by Jakob Schöttl
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
Some of them work with some other programs. But when it works, it's
- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus
(super+j)
- doesn't work at all with some programs
Is there a way to get virtual keyboards work with Xmonad, reliably and
for all programs?
Thank you!
Jakob
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
It this virtual keyboard _NET_WM_WINDOW_TYPE_DOCK or smth like this? If not,
it may be useful to make it be of this type.
No, at least florence and onboard are not (xprop | grep DOCK).

What is this property and how can I set it?
Brandon Allbery
2016-01-01 03:44:11 UTC
Permalink
Post by Jakob Schöttl
Post by Bogdan Sinitsyn
Post by Jakob Schöttl
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
Some of them work with some other programs. But when it works, it's
- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus
(super+j)
- doesn't work at all with some programs
Is there a way to get virtual keyboards work with Xmonad, reliably and
for all programs?
Thank you!
Jakob
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
It this virtual keyboard _NET_WM_WINDOW_TYPE_DOCK or smth like this? If not,
it may be useful to make it be of this type.
No, at least florence and onboard are not (xprop | grep DOCK).
What is this property and how can I set it?
You probably can't set it, at least early enough for it to matter.
http://standards.freedesktop.org/wm-spec/latest/ar01s05.html#idm139870830002400

You could however look for other properties in xprop output (probably you
wan WM_CLASS) and doIgnore it in the ManageHook so it won't take focus and
will float.

Do the programs where it doesn't work under xmonad, work with it under
another window manager? X11 actually makes this hard to do, for security
reasons. xvkbd probably uses sendEvents, which some programs ignore as
potential security issues (they are flagged by the X server as synthetic).
If you enable the XTest extension and use a virtual keyboard that supports
XTest, it will work reliably... but you've opened a bit of a security hole
in the X server since now malicious programs can do things like injecting
commands into a terminal with a root shell in it. (xmonad has no control
whatsoever over this, it is the X server that controls it.)
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Bogdan Sinitsyn
2016-01-01 10:22:47 UTC
Permalink
Post by Brandon Allbery
Post by Jakob Schöttl
Post by Bogdan Sinitsyn
Post by Jakob Schöttl
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
Some of them work with some other programs. But when it works, it's
- after typing I have to click two times to a new input field to set focus
- virtual keyboard steals focus
- other windows get invisible and only come back when they get focus
(super+j)
- doesn't work at all with some programs
Is there a way to get virtual keyboards work with Xmonad, reliably and
for all programs?
Thank you!
Jakob
_______________________________________________
xmonad mailing list
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
It this virtual keyboard _NET_WM_WINDOW_TYPE_DOCK or smth like this? If not,
it may be useful to make it be of this type.
No, at least florence and onboard are not (xprop | grep DOCK).
What is this property and how can I set it?
You probably can't set it, at least early enough for it to matter.
http://standards.freedesktop.org/wm-spec/latest/ar01s05.html#idm139870830002
400
You could however look for other properties in xprop output (probably you
wan WM_CLASS) and doIgnore it in the ManageHook so it won't take focus and
will float.
Do the programs where it doesn't work under xmonad, work with it under
another window manager? X11 actually makes this hard to do, for security
reasons. xvkbd probably uses sendEvents, which some programs ignore as
potential security issues (they are flagged by the X server as synthetic).
If you enable the XTest extension and use a virtual keyboard that supports
XTest, it will work reliably... but you've opened a bit of a security hole
in the X server since now malicious programs can do things like injecting
commands into a terminal with a root shell in it. (xmonad has no control
whatsoever over this, it is the X server that controls it.)
If it's just ignored, it theoretically could be overlapped by some new
windows. But if xmonad thinks it's strut(it doesn't have to be of the dock
type for this), it wouldn't be overlapped. Another solution is to make it
always stay on top of other windows, but I don't know how to do it with xmonad
if it's ignored.
--
Bogdan Sinitsyn
Brandon Allbery
2016-01-01 14:52:22 UTC
Permalink
Post by Bogdan Sinitsyn
If it's just ignored, it theoretically could be overlapped by some new
windows. But if xmonad thinks it's strut(it doesn't have to be of the dock
type for this), it wouldn't be overlapped. Another solution is to make it
always stay on top of other windows, but I don't know how to do it with xmonad
if it's ignored.
Only floating windows would overlap it; tiled windows would go below it. I
don't think this would be too much of a problem in practice though. (Partly
because floating windows are badly behaved anyway --- note that the strut
is only applied to tiled windows!)
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Paul Fertser
2016-01-01 06:37:35 UTC
Permalink
Post by Jakob Schöttl
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
I can tell you that I'm very satisfied with xvkbd and Xmonad on my
smartphone.

Please see http://paste.debian.net/359010/ (as gitorious.org still
hasn't migrated the repositories to web archive...).
Post by Jakob Schöttl
Some of them work with some other programs. But when it works, it's still
I didn't notice any issues with the apps I use with this config.
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:***@gmail.com
Jakob Schöttl
2016-01-02 03:49:36 UTC
Permalink
Post by Paul Fertser
Post by Jakob Schöttl
Because there is no hardware keyboard I need a virtual keyboard. I tried
these programs: xvkbd, matchbox-keyboard, onboard, florence
I can tell you that I'm very satisfied with xvkbd and Xmonad on my
smartphone.
Please see http://paste.debian.net/359010/ (as gitorious.org still
hasn't migrated the repositories to web archive...).
Post by Jakob Schöttl
Some of them work with some other programs. But when it works, it's still
I didn't notice any issues with the apps I use with this config.
Thanks for sharing your config! I just tried xvkbd. When ignored it
works with all my other programs! (On system, it can only be launched
with a terminal and not with dmenu.)

I just have to position it somehow. At the moment it's at 0/0.
Brandon Allbery
2016-01-02 03:50:51 UTC
Permalink
Post by Jakob Schöttl
I just have to position it somehow. At the moment it's at 0/0.
Look for a -geometry parameter, or possibly specify one in .Xresources. You
probably can't position it within xmonad, at least not sanely.
--
brandon s allbery kf8nh sine nomine associates
***@gmail.com ***@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
Paul Fertser
2016-01-02 08:09:26 UTC
Permalink
Post by Jakob Schöttl
I just have to position it somehow. At the moment it's at 0/0.
Look for a -geometry parameter, or possibly specify one in .Xresources. You
probably can't position it within xmonad, at least not sanely.
Yes, I just have

xvkbd.windowGeometry: 480x200+0+440
xvkbd.compact: true

And as you might have noticed, I do not stop it when I need screen
space, I just let Xmonad cover it, and once I need the keyboard, I
press a hardware button to reveal it back.
--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:***@gmail.com
Loading...