-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keyboard woes #9
Comments
Success!!! (Kinda, sorta, maybe) There's still a lot of issues, but something actually works. As you can see, there's lots of rendering or positioning issues. The accept or close buttons didn't work, which makes me think the keyboard may be a modal. And worst of all, it sometimes segfaults when trying to open that editbox. But I can type text into a |
I did it! I have an initial (seemingly) working implementation for allowing user text input. So, it turns out that the Note to all: If creating a widget with There's still work to be done. I'm sure I've made mistakes somewhere, and the code is going to need to be looked at closely by others before I'm comfortable merging it into master. But I've made a good start. And here's the result so far:
|
Complete refactor of the confirmation dialog system, by spinning it off into it's own class? Check. Multi-line text editing support? Check. There's probably enough here now to create the most rudimentary of file editors... |
Behold! What follows is the worlds crappiest script for the crappiest file editor you'll ever see. As an extra bonus feature, it even eats line endings on saving the document back! Works with the current WIP branch https://github.com/shermp/NickelDBus/tree/text-edit WARNING: THE FOLLOWING SHELL SCRIPT IS FOR PROFESSIONALS ONLY. PLEASE DO NOT TRY THIS AT HOME. #!/bin/sh
strip_qndb_prefix() {
printf "%s" ${1#dlgConfirmTextInput }
}
result=$(qndb -s dlgConfirmTextInput -m dlgConfirmLineEdit "Choose File" "Open")
filename=$(strip_qndb_prefix "$result")
if [ -f "$filename" ]; then
filecontents=$(cat "$filename")
edit_result=$(qndb -s dlgConfirmTextInput -m dlgConfirmTextEditSet "Editing" "Save" "$filecontents")
edit_content=$(strip_qndb_prefix "$edit_result")
printf "%s" "$edit_content" > "$filename"
fi |
I'm not sure what to do about international keyboards, whether I should bother or not (I've currently hard-coded it to show the English KB). Two parameters are needed, a It seems to be treated like an integer, so I assume it may be an
Which corresponds to the following assembly:
Ghidra seems to not have any further information on what a (Note, I'm currently just passing |
Well I figured out how to use The consequence is dropping support for multi-line text editing, as I'm not too upset though, I was feeling that the previous code was probably a bit fragile, and was rather complicated, and relied on a lot of libnickel symbols. Multi-line editing was probably approaching feature-creep anyway. Also, as a sidenote, I learned it's possible to call |
Not really. I looked into it a bit to update the keyboard patches and to look into how touch works, but I haven't done much with it.
Nice!
About KeyboardScript, that's used in Practically speaking, it's either an enum, function pointer, or function table offset (I've only skimmed the code and followed references, not actually done the math and/or hooking). I'll look into it more when I have a chance.
Yes, that's correct. Theoretically, it's possible to replace the edit field itself after creating it, then linking them together, but it's not worth the hassle or fragility. It's possible to make it more stable if we completely figured out
That's... odd. libstdc++ itself calls malloc directly for Do you have the address where it segfaulted? Also, what address does a call to |
I think I may have been mistaken. The root cause of my issues I was having at the time was probably not making the size of the memory allocation large enough (I've since rectified that). Sure enough, just ran a test, and malloc works as well. I'll probably continue to use
It's probably an enum, that seems to be the sort of thing an enum would be used for, and would probably have the same concept as |
I've spend the last couple of days trying to see if I could figure out how to do some sort of text input. I'm afraid I haven't gotten very far.
Getting a QLineEdit, or even a TouchLineEdit (which inherits QLineEdit) onto confirmation dialog is easy. But then I've got to try and attach a keyboard to it. And this is where I've gotten all in a muddle and a tangle.
There looks to be so many different pieces to the puzzle.
KeyboardController
(andExtendedKeyboardController
andSearchKeyboardController
).KeyboardFrame
.KeyboardReceiver
.VirtualKeyboard
. And I'm not really sure how they all interact with each other.This is partially what I THINK might happen:
KeyboardReceiver
wraps aQLineEdit
orQTextEdit
(there's a constructor for both). I'm not really sure what this does, but I think it's the glue that connects a text edit widget with the keyboardKeyboardController
manages a keyboard? It seems to be the derived classSearchKeyboardController
that is mostly used. They have a method to set aKeyboardReceiver
createKeyboard
that invokes thelocalizedKeyboard
method of the above factory.And yet, after all this digging, I STILL haven't managed to show a *****y keyboard on screen!
Has anyone (cough @pgaskin ) looked into how the keyboard system works? And how one might use it?
The text was updated successfully, but these errors were encountered: