Maniphest T22036

Can't input exclamation mark on on (at least) Windows
Closed, Archived

Assigned To
None
Authored By
Yannick Duchêne (hibou57)
Apr 15 2010, 10:29 AM
Tags
  • BF Blender
  • Translations
Subscribers
Burt Reynolds (burt_reynolds)
Diego Borghetti (bdiego)
Douglas E Knapp (magickcrow)
Harley Acheson (harley)
Ignacio Fernández (hellmoon666)
Johannes Gietl (manaphuun)
Matt Ebb (broken)
Yannick Duchêne (hibou57)

Description

Hello all,

In the text editor, simply can't input an exclamation mark "!" (nor the chapter symbol character "§", which is on the same key on azerty french keyboards)

Also on azerty french keyboards, can't input "µ", "£" and "²". Input of one of these as the first character is ok, while if it is typed next to a previous character, weirds characters are displayed instead (troubles with Unicode ?)

I do not really know if it's a Python stuff or a Blender stuff (I suppose the editor in implemented in Python, while I may be wrong about it).

Some characters may not be required to type relevant texts, however the "!" seems widely used, so this may cause some troubles if this can't be entered (I'm not just thinking about writing Python script, I'm thiking about using the embedded editor for documentation purpose about scenes, models, and the like).

No test file attached

Blender 2.5 Alpha 2 Revisions 28035 and 28199 (checked on both) on Windows XP

Event Timeline

Yannick Duchêne (hibou57) edited a custom field.Apr 15 2010, 10:29 AM
Burt Reynolds (burt_reynolds) added a comment.Apr 15 2010, 11:38 AM

I can reproduce this by setting my keyboard layout to french (I never knew you had to press shift to use numbers on AZERTY)
Maybe you can work around it by adding the belgian layout to your language bar. It's AZERTY too, but the keys are different otherwise (! is on 8, and it works)
Win7,rev. 28199

Yannick Duchêne (hibou57) added a comment.Apr 15 2010, 11:57 AM

<< (I never knew you had to press shift to use numbers on AZERTY) >>

Yes, we *have to* :D (and that's so boring and pains, pfff...)

Thanks for the temporary workaround using Belgian keyboard layout

Matt Ebb (broken) added a comment.Apr 15 2010, 12:54 PM

Need a developer who uses a french layout to take a look at this, I'm not familiar with the issues here.. Though I remember Jean-Luc talking about something like this at winter camp.

Not sure if this is intended to be supported now, either.

Yannick Duchêne (hibou57) added a comment.Apr 15 2010, 1:04 PM

<< Need a developer who uses a french layout to take a look at this >>

Although I'm not a Blender developer, I would be OK to have a look at this, providing some one tell me where about is this kind of stuff in the source (while I've never compiled Blender, I hope it can compiles with MinGW).

Johannes Gietl (manaphuun) added a comment.Apr 16 2010, 5:10 PM

There seems to be a problem with special characters in general.
I'm using a german keyboard layout (http://commons.wikimedia.org/wiki/File:KB_Germany.svg) and I'm also unable to input "§", as well as any umlauts (ä,ö,ü) and most special characters which are typed using the "AltGr" modifier key. Exclamation marks work fine.

Blender 2.52 r28232
OS: Arch Linux x86_64 (so it can't be only Windows related!)
Python 3.1.2

I just tested on a windows XP box, and got the same issues with previous characters that Yannick described.

Ignacio Fernández (hellmoon666) added a comment.Apr 20 2010, 4:17 PM

I checked this and i noticed that the problem is that the "modifier character", i.e '´', is stored before the character 'á' in the string so when drawing it weird things happens. Preventing "modifier characters" to be stored solves the problem but I don't know if dealing directly with ascii input characters is the intended way to go, some experienced Blender dev may know more.

Also "modifier characters" don't work with the "Text" object.

All the international text input seems bad handled in blender, but the drawing part it's ok.

Diego Borghetti (bdiego) added a comment.Apr 20 2010, 5:56 PM

Hello all:

It's not a problem, I mean, the things is that blender don't have international text input, yes the drawing part is fine (blenfont draw text as UTF8), but the text editor only work with Ascii character (or the last time I check was that).. and I think you can't dealing directly with ascii input because the problem is that, is not ascii input, it's UTF8 or whatever the keyboard french have.

What is weird is the exclamation mark !, because that is a valid ascii character, but also can be a problem of the french keyboard layaout..

Anyway, to make this work fine, what we need is a full UTF8 editor and that can be really hard to implement right now.

If I don't remember bad, Brecht write the text editor for 2.5, so maybe he know more about this problem.

Harley Acheson (harley) added a comment.Apr 20 2010, 9:17 PM

Hello,

On the US-style keyboard, to get "!" I have to hold down shift and press the key that is also used for the number "1". So there are two scancodes: 16 (the shift), then 49. I can press the key to the left of the right shift and get a scancode of 191 and a "/" is displayed

With the French Azerty keyboard I have to press the key just to the left of the right shift key to get a scancode of 223, which displays as "!".

On windows we handle this difference by saving the result of "GetKeyboardState", then calling "MapVirtualKey" with our keycode as input, then calling ToAscii with the results.

This way we get an ascii "!" not matter what the input language or keyboard layout.

Harley Acheson (harley) added a comment.Apr 20 2010, 9:44 PM

There are variations of those calls for unicode as well, MapVirtualKeyExW and ToUnicodeEx, which might be the better road to go down if this is looked at.

Douglas E Knapp (magickcrow) added a comment.Apr 21 2010, 11:46 AM

I open a new bug but was directed here so I am adding my bug here too. It would seem that blender is reading the base Linux keyboard but not the keyboard that is selected with the Desktop. In my case by base layout is Dvorák but with blender I normally use German but that does not work at all. The old blender did not have this problem. This is a 2.5 problem.

Initial Comment:
Apr 20 2010
Keyboard switching not work for me, svn current 64 bit Linux.
When I switch keyboards from Dvorák to German they keys in Blender stay set to Dvorák. This is a real pain because I use one hand with blender and I can't read the Dvorák buttons but am stating to get used to it. LOL.
Updated KDE 4 btw with 9.10 Kubuntu.

Works on base file.

Douglas

----------------------------------------------------------------------

>Comment By: Matt Ebb (broken)
Date: 2010-04-21 16:35

Message:
I'm pretty sure this is the same issue as in report #22036 Can't input exclamation mark on on (at least) Windows

(blender using key codes rather than the actual characters)

I'll close this report, you can follow the other one here: https://projects.blender.org/tracker/index.php?func=detail&aid=22036&group_id=9&atid=498

Yannick Duchêne (hibou57) added a comment.Apr 21 2010, 1:25 PM

After Douglas's words, I've made a check on Blender 2.49 on Windows XP.

There as well, I could not type an exclamation mark in the embedded text editor. 2.49 does not work exactly the same as Blender 2.5 here, as some characters which could not be typed in Blender 2.5, could be in Blender 2.49, ex: "£" and "µ". However, the "²" fails as well with 2.49.

I did not check all characters, these are just some examples.

While this was working differently, and so was possibly OK in some circumstances with Blender 2.49, this version was already a case.

Ignacio Fernández (hellmoon666) added a comment.Apr 21 2010, 4:45 PM

I've made a patch that solves some of the issues in this thread for Windows Systems. The main issue is harder to fix as it involves utf8 input integration in Blender/Ghost. Please check:

https://projects.blender.org/tracker/index.php?func=detail&aid=22106&group_id=9&atid=127

Diego Borghetti (bdiego) added a comment.May 11 2010, 12:50 AM

Hello,

Ok, first of all, Blender never support utf8 input, not the 2.49 and also not the 2.5x, that is way work in some keyboard layout and not in others.

Is really hard to add support right now on Blender and there is a lot of other things that we need finish before make such a big change.

I close the bug report because is not really a bug and it's already in the Todo list for 2.5x (wiki http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/UserInterface)

Thanks.

- Diego

Diego Borghetti (bdiego) changed the task status from Unknown Status to Archived.May 11 2010, 12:50 AM