What is minimum steps i need to follow to access virtual keyboard in linux ?
-
I have seen that third party plug in i can use with qt but there are more complexity. so i want to use qt c++ based virtual keyboard which simply take input like hardware keyboard in different language.
I want minimum easy steps to use it on linux. i does not want qml based example.
If any body can assign fast approach to achieve this task. it will be very helpful. Because when we try new things it take time. So i want approach to get things done fast.
Thank you.
-
What does access a virtual keyboard mean?
Are you saying that you have a virtual keyboard running (let's be honest, this is just a program).
And, you want to take information from that program or you want to send that program some information from your program?
This would be an interprocess communication. -
@stretchthebits access means open a virtual keyboard which can do all operation like keyboard open on mobile.
I want this keyboard take i/p when user click on it and I want to show it on line edit.
But it not take i/p. It just open. But not take i/p from user
-
So you are already using some virtual keyboard?
-
@Qt-embedded-developer There is this
https://en.wikipedia.org/wiki/Unix_domain_socket
It mentions SOCK_STREAMIt sounds like you have to modify the source code of the virtual keyboard that you are using so that it communicates with your program.
-
@Qt-embedded-developer said in What is minimum steps i need to follow to access virtual keyboard in linux ?:
@mrjj yes
You might want to give more details about what you are using, some links so people can check what it is, etc.
-
@SGaist link for Florence keyboard
http://florence.sourceforge.net/english.html
I have installed it on pc. On pc my code is working fine but on target device it is not working
-
Do you have X11 running on your device ?
-
@SGaist yes i am running it with X11.
My debug log are shown below :
Florence version 0.6.3
Using configuration file test.conf(gst-plugin-scanner:5910): GStreamer-WARNING **: Failed to load plugin '/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstimxaudio.so': lib_mp3_enc_arm12_elinux.so.2: cannot open shared object file: No such file or directory
XRecord extension found version=1.13
CONF:input-method=<'button'>
CONF:file=<'/usr/share/florence/layouts/compact.xml'>
Using file /usr/share/florence/layouts/compact.xml
Layout name: "Compact keyboard"
CONF:style=<'/usr/share/florence/styles/flat'>
Using file /usr/share/florence/styles/flat/florence.style
CONF:key=<'#000000'>
CONF:outline=<'#808080'>
CONF:label=<'#FFFFFF'>
CONF:label-outline=<'#000000'>
[new shape] name=default svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="200" viewBox="0 0 200 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="192" height="192"/>
</svg>"
[new shape] name=mini svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="100" viewBox="0 0 200 100"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="192" height="92"/>
</svg>"
[new shape] name=tiny svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="181.25" height="100" viewBox="0 0 181.25 100"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="173.25" height="92"/>
</svg>"
[new shape] name=small svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="200" viewBox="0 0 100 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="92" height="192"/>
</svg>"
[new shape] name=Wide svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="300" height="200" viewBox="0 0 300 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="292" height="192"/>
</svg>"
[new shape] name=XL svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="400" height="200" viewBox="0 0 400 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="392" height="192"/>
</svg>"
[new shape] name=XXL svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="500" height="200" viewBox="0 0 500 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="492" height="192"/>
</svg>"
[new shape] name=High svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="200" height="400" viewBox="0 0 200 400"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="192" height="392"/>
</svg>"
[new shape] name=Space svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="1200" height="200" viewBox="0 0 1200 200"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<rect class="shape" x="4" y="4" width="1192" height="192"/>
</svg>"
[new shape] name=Return svg="<svg xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" version="1.1" width="300" height="400" viewBox="0 0 300 400"><style type="text/css">.shape {
fill: #000000;
stroke: #808080;
stroke-opacity: 0.35;
stroke-width: 4px;
}.symbol {
fill: #FFFFFF;
stroke: #000000;
stroke-width: 2px;
}.symbol-fill {
fill: #FFFFFF;
}.symbol-outline {
fill: #000000;
stroke: #FFFFFF;
stroke-width: 3px;
}
</style>
<path class="shape" d="M4 4 L292 4 L296 396 L104 396 L104 196 L4 196 Z"/>
</svg>"
[new symbol] name=Control_[LR] label=ctrl
[new symbol] name=Super_[LR] label=(null)
[new symbol] name=(Alt_[LR]|Meta_L) label=alt
[new symbol] name=ISO_Level3_Shift label=altGr
[new symbol] name=BackSpace label=(null)
[new symbol] name=Tab label=(null)
[new symbol] name=ISO_Left_Tab label=(null)
[new symbol] name=Return label=(null)
[new symbol] name=Caps_Lock label=(null)
[new symbol] name=(Shift_[LR]|(KP_|)Up) label=(null)
[new symbol] name=(KP_|)Insert label=ins
[new symbol] name=(KP_|)Home label=(null)
[new symbol] name=(KP_|)Page_Up label=(null)
[new symbol] name=(KP_|)Delete label=del
[new symbol] name=(KP_|)End label=end
[new symbol] name=(KP_|)Page_Down label=(null)
[new symbol] name=(KP_|)Down label=(null)
[new symbol] name=(KP_|)Left label=(null)
[new symbol] name=(KP_|)Right label=(null)
[new symbol] name=KP_Enter label=ent
[new symbol] name=Num_Lock label=nlk
[new symbol] name=Escape label=esc
[new symbol] name=F1 label=F1
[new symbol] name=F2 label=F2
[new symbol] name=F3 label=F3
[new symbol] name=F4 label=F4
[new symbol] name=F5 label=F5
[new symbol] name=F6 label=F6
[new symbol] name=F7 label=F7
[new symbol] name=F8 label=F8
[new symbol] name=F9 label=F9
[new symbol] name=F10 label=F10
[new symbol] name=F11 label=F11
[new symbol] name=F12 label=F12
[new symbol] name=Print label=psc
[new symbol] name=Scroll_Lock label=slk
[new symbol] name=Pause label=brk
[new symbol] name=(.)tilde label=~
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=(null)
[new symbol] name=(null) label=123
[new symbol] name=(null) label=ABC
[new sound] match=(Control_[LR]|Super_[LR]|Alt_[LR]|Meta_L|ISO_Level3_Shift|Shift_[LR]|Caps_Lock|Num_Lock) press=file:///usr/share/florence/styles/default/sounds/modifier_press.ogg release=file:///usr/share/florence/styles/default/sounds/modifier_release.ogg hover=(null)
[new sound] match=(Tab|[Ss]pace|BackSpace) press=file:///usr/share/florence/styles/default/sounds/modifier_press.ogg release=(null) hover=(null)
[new sound] match=Return press=file:///usr/share/florence/styles/default/sounds/return_press.ogg release=file:///usr/share/florence/styles/default/sounds/return_release.ogg hover=(null)
[new sound] match= press=file:///usr/share/florence/styles/default/sounds/press.ogg release=file:///usr/share/florence/styles/default/sounds/release.ogg hover=(null)
keyboard layout found: <English (US)>
keyboard layout symbol name=<pc+us+inet(evdev)>
new xkb symbol found: <us>
[new keyboard] name=(null) id=(null)
[new key] x=0.500000 y=1.000000 w=1.000000 h=2.000000
[new key] x=2.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=4.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=6.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=8.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=10.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=12.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=14.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=16.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=18.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=20.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=22.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=24.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=27.000000 y=1.000000 w=4.000000 h=2.000000
[new key] x=1.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=7.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=9.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=11.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=13.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=15.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=17.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=19.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=21.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=23.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=25.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=27.500000 y=4.000000 w=3.000000 h=4.000000
[new key] x=1.500000 y=5.000000 w=3.000000 h=2.000000
[new key] x=4.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=6.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=8.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=10.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=12.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=14.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=16.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=18.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=20.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=22.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=24.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=26.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=7.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=9.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=11.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=13.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=15.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=17.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=19.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=21.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=23.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=26.500000 y=7.000000 w=5.000000 h=2.000000
[new key] x=1.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=11.500000 y=9.000000 w=11.000000 h=2.000000
[new key] x=18.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=20.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=22.000000 y=9.000000 w=2.000000 h=2.000000
[new key] x=24.000000 y=8.500000 w=2.000000 h=1.000000
[new key] x=26.000000 y=8.500000 w=2.000000 h=1.000000
[new key] x=28.000000 y=8.500000 w=2.000000 h=1.000000
[new key] x=24.000000 y=9.500000 w=2.000000 h=1.000000
[new key] x=26.000000 y=9.500000 w=2.000000 h=1.000000
[new key] x=28.000000 y=9.500000 w=2.000000 h=1.000000
[new keyboard] name=Function keys id=compactfn
CONF:extensions=<''>
[new key] x=0.906250 y=0.500000 w=1.812500 h=1.000000
[new key] x=2.718750 y=0.500000 w=1.812500 h=1.000000
[new key] x=4.531250 y=0.500000 w=2.000000 h=1.000000
[new key] x=6.343750 y=0.500000 w=1.812500 h=1.000000
[new key] x=8.156250 y=0.500000 w=1.812500 h=1.000000
[new key] x=9.968750 y=0.500000 w=1.812500 h=1.000000
[new key] x=11.781250 y=0.500000 w=1.812500 h=1.000000
[new key] x=13.593750 y=0.500000 w=1.812500 h=1.000000
[new key] x=15.406250 y=0.500000 w=1.812500 h=1.000000
[new key] x=17.218750 y=0.500000 w=1.812500 h=1.000000
[new key] x=19.031250 y=0.500000 w=1.812500 h=1.000000
[new key] x=20.843750 y=0.500000 w=1.812500 h=1.000000
[new key] x=22.656250 y=0.500000 w=1.812500 h=1.000000
[new key] x=24.468750 y=0.500000 w=1.812500 h=1.000000
[new key] x=26.281250 y=0.500000 w=1.812500 h=1.000000
[new key] x=28.093750 y=0.500000 w=1.812500 h=1.000000
[new key] x=30.000000 y=0.500000 w=2.000000 h=1.000000
[new key] x=32.000000 y=0.500000 w=2.000000 h=1.000000
[new key] x=34.000000 y=0.500000 w=2.000000 h=1.000000
[new key] x=36.000000 y=0.500000 w=2.000000 h=1.000000
[new keyboard] name=Numeric keys id=compactnm
[new key] x=1.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=7.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=7.000000 y=4.000000 w=2.000000 h=4.000000
[new key] x=1.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=3.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=5.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=7.000000 y=8.000000 w=2.000000 h=4.000000
[new key] x=2.000000 y=9.000000 w=4.000000 h=2.000000
[new key] x=5.000000 y=9.000000 w=2.000000 h=2.000000
[new keyboard] name=Florence keys id=actionkys
[new key] x=1.000000 y=1.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=3.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=5.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=7.000000 w=2.000000 h=2.000000
[new key] x=1.000000 y=9.000000 w=2.000000 h=2.000000
CONF:scalex=<16.57>
CONF:scaley=<23.0>
CONF:always-on-top=<true>
CONF:task-bar=<false>
CONF:resizable=<true>
CONF:keep-ratio=<false>
CONF:decorated=<false>
CONF:xpos=<0>
CONF:ypos=<570>
Your screen does not support alpha channel. Semi-transparency is disabled
CONF:transparent=<true>
CONF:keep-on-top=<false>
CONF:trayicon=<true>
CONF:startup-notification=<false>
CONF:timer=<1300.0>
CONF:system-font=<true>
CONF:mouseover=<'#0000FF'>
DBus name aquired: org.florence.Keyboard
Using configuration file test.conf
CONF:hide-on-start=<false>
CONF:auto-hide=<false>
Executing method show
CONF:auto-hide=<false>
CONF:floaticon=<false>
Key 0x1ff7dc8 (type 0): Event 0 received : Switching from state 1 to 1 (fsm 0)
sending press event
CONF:sounds=<false>
Key 0x1ff7dc8 (type 0): Event 2 received : Switching from state 1 to 0 (fsm 0)
Key 0x1ff7dc8 (type 0): Event 0 received : Switching from state 0 to 0 (fsm 0)
CONF:activated=<'#FF0000'>
Key 0x1ff7dc8 (type 0): Event 1 received : Switching from state 0 to 0 (fsm 0)
sending release event
Key 0x1ff7dc8 (type 0): Event 3 received : Switching from state 0 to 1 (fsm 0)
CONF:ramble-button=<true>
I have used below configuration file for configure keyboard on LCD screen of I.MX6
---------- florence.conf ------
[window]
xpos=0
ypos=570opacity=100.000000000000000
scalex=16.57
scaley=23.0decorated=false
transparent=true
resizeable=false
keep-ratio=false
task-bar=falsealways-on-top=true
keep-on-top=false[behaviour]
startup-notification=false
input-method='button'auto-hide=false
intermediate-icon=true
move-to-widget=true[style]
focus-zoom=1sounds=false
[layout]
extensions=''
file='/usr/share/florence/layouts/compact.xml'
style='/usr/share/florence/styles/flat'[controller]
floaticon=false -
Does it work with a default X11 application like xterm ?
-
@SGaist it's work on my linux pc. But Not work on my yokto based os on I. Mx6. It's just get open but not receive click.
As in log you can see that release event happening but response of released key not come on console
-
That does not answer my question.