Comments (8)
What keyboard are you trying to use, exactly?
from framework.
I am attempting to use the Maliit-2 keyboard via DBUS.
from framework.
I do not really understand what you really want to achieve, there might be a better way.
DBus is used to communicate between Maliit keyboard and the application input context. For the specific error message, the input context need to register such an object on the DBus. See
https://github.com/maliit/framework/blob/master/connection/dbusserverconnection.cpp#L93
from framework.
I am attempting to use the Maliit-2 keyboard via DBUS.
https://github.com/maliit/keyboard ?
Can you be more specific about how you are running things. Are you using a Qt application as the client? Gtk3? What?
The DBus interface works very well, and is used in Ubuntu Touch.
from framework.
- Really appreciate you working with me here.
Back on topic.
I have an application that runs on a tablet. i wish to replace the existing keyboard with the maliit-2 keyboard.
It was decided that we would utilize dbus to control the keyboard, specifically to adjust its position and to set the current language. One of the reasons it was chosen was because of its language support.
The application is a Qt application, qml to be specific. I am currently attempting to get everything working before I move to the tablet device for additional dev.
Currently, I have a class that opens the dbus connection, gets the address and connects to maliit-server. I am able to do things like setpreedit text for example. However, when I attempt make calls to the keyboard for example to set the current language, i get the aforementioned error message.
I will take a look at that code snippet now, thank you for that JPeterson.
-Langston Ball
from framework.
Unfortunately it seems im a bit dense and am still struggling with this.
QSharedPointer<Maliit::InputContext::DBus::Address> address;
QByteArray maliitServerAddress = qgetenv("MALIIT_SERVER_ADDRESS");
if (!maliitServerAddress.isEmpty()) {
address.reset(new Maliit::InputContext::DBus::FixedAddress(maliitServerAddress.constData()));
} else {
address.reset(new Maliit::InputContext::DBus::DynamicAddress);
}
connect(address.data(), SIGNAL(addressReceived(QString)), this, SLOT(setupKeyboard(QString)));
m_dbusServerConn = new DBusServerConnection(address);
The above code works to allow me to communicate with the server from inside my application.
This snippet from the 'setupKeyboard' function is what I thought I would use to connect to the keyboard instance itself
QDBusConnection lcl = QDBusConnection::connectToPeer(addr, "Maliit::IMServerConnection");
m_keyboardInterface = new MaliitKeyboardInterface(
QString(),
"/com/meego/inputmethod/inputcontext",
lcl );
Unfortunately, the following seems to not connect to the keyboard which i am trying to do for 2 main reasons:
- allow the user to change language
- be able to know when they keyboard is shown and its geometry so that i can adjust my application to make space for the keyboard.
Thanks for any insights you can provide.
-Langston Ball
from framework.
- allow the user to change language
I don't think this can be done via DBus with the new keyboard. Instead it should be done by setting the active language key in GSettings. There is also another key there to be set for which languages are enabled, and there is a menu in the keyboard which shows this list, as well as a Settings…
entry, which normally would take one to the settings panel in the system settings of Plasma Mobile or Lomiri (there is no generic settings UI, and other environments aren't really supported so well yet).
- be able to know when they keyboard is shown and its geometry so that i can adjust my application to make space for the keyboard.
Given your app is QML, you can simply use Qt.inputMethod.keyboardRectangle
values to adjust your app's size/anchors:
https://doc.qt.io/qt-5/qml-qtqml-qt.html#inputMethod-prop
https://doc.qt.io/qt-5/qinputmethod.html#keyboardRectangle-prop
from framework.
Thanks, that's what I searching for!
from framework.
Related Issues (20)
- pkg-config files are broken when CMAKE_INSTALL_{DATA,INCLUDE,LIB}DIR is absolute
- tests/ut_mimserveroptions/ut_mimserveroptions.cpp: FTBFS ,error: no match for ‘operator==’ (operand types are ‘const MImServerCommonOptions’ and ‘const MImServerCommonOptions’) HOT 8
- Windows resize when using maliit HOT 1
- Keyboard Icons Missing HOT 2
- maliit-server can't create dbus socket with dbus 1.15.2 HOT 1
- ft_mimpluginmanager test failure HOT 1
- Building latest `master` fails HOT 6
- undefined reference to 'vtable for Maliit::XCBPlatform' HOT 2
- permission to bind input_method denied HOT 34
- (Maybe) another Ubuntu snag; XCB_LIBRARIES, despite libxcb1-dev being installed, doesn't seem to be detected HOT 3
- make not able to compile HOT 3
- Settings schema 'org.maliit.keyboard.maliit' is not installed HOT 1
- Crash when I try to open settings of Maliit virtual keyboard on Wayland session of KDE Plasma HOT 10
- Crashes frequently in Fedora 34 and 35 HOT 25
- Recommended type of window manager. HOT 4
- cmake error installing HOT 1
- Ut_MInputMethodQuickPlugin::testQmlSetup fails to test on Debian testing/unstable HOT 4
- maliit-framework: no-manual-page usr/bin/maliit-server
- Logging HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from framework.