-
Notifications
You must be signed in to change notification settings - Fork 10
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
Special characters in pyQt text_editors (french keyboard, french Windows 7) #10
Comments
I have exactly the same problem with some special symbols in my qwerty keyboard (spanish distribution), i.e. to get a hashtag symbol (#) I usually press Alt Gr + 3 but inside softimage it only work pressing Shift + 3 (and you have to do some black magic to figure that out!). I guess it has something to do with softimage and his hardcoded interpretation of keys, but I don't know how to fix it 👎 |
I think it's something to change in the PyQtForSoftimage\Application\Plugins\qtevents.py For "" => 56: ( Qt.Key_8, '', None ) |
makes sense the mapping is problematic, softimage doesn't even support french, it supports english and japanese. if you can adjust the keymapping to work for both english and french then i will accept a change/pull request |
So I have map a french keyboard. This is my qtevents.py file:
|
thanks for the code, we will need to evaluate if this is something we should support. i also need to test it in an english only keyboard environment. lastly, cesar, if he could make his own for spanish using this code as a guide we might have better language/keyboard support :) so you confirm this is working for you? |
Sure, I can work on a template and share it. But... what do you think about read the keyboard layout via win32api.GetKeyboardLayout() (dunno about linux, it's already supported?) and dinamically get the right mapping template from an external file (json, pickle or any other i/o module). Or maybe we could add a softimage preference to set the language and keep it simple. I dont know, add a new template in the middle of the logic/code doesn't feels right to me, maybe there's a better way. |
exactly, that is not why i am just including the linked code. your suggestions sound more like what i want. we need to consider how a user would configure this, if they need to at all. i guess i was suggesting to you if you could add your own keycodes to test if this works around the issue, a long term cleaner solution is definitely what we all want. |
Sure this is not the best way to do! This code was more for helping making a new keyboard template. |
your code is very welcome and proves we have work to do in order to make it more language compliant. i am glad we can agree this isn't the preferred method going forwards. i don't know when i will have time to work on it, but in the mean time you have a workaround, correct? |
yes this code is my workaround, so there is no emergency!! |
here is some reference for future development... |
Hello,
Inside Softimage, I can't manage to type an underscore "" in the QLineEdit (or QTextEditor) it is always replaced by 8. ( It's the same for all "Alt + " keys )
I've tried to type "azerty" to be sure I'm not in qwerty mode, and it enters correctly "azerty".
If I copy/paste the "" from a text editor, it works, so it's seems to come from the keyboard mapping in pyQt.
I'm putting it in issue because the problem doesn't happen in standalone, but I'm assuming that I probably did something wrong, or there's an option in pyQt to fix this!!
I'm using an azerty keyboard, and a french windows 7
The text was updated successfully, but these errors were encountered: