bugGNUstep - Bugs: bug #25005, windows, cannot type certain...

Group
 
 

bug #25005: windows, cannot type certain characters

Submitter:  Riccardo Mottola <rmottola>
Submitted:  Wed 03 Dec 2008 04:41:02 PM UTC
   
 
Category:  Backend Severity:  3 - Normal
Item Group:  Bug Status:  Duplicate
Privacy:  Public Assigned to:  FredKiefer
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Wed 28 Jan 2009 08:02:56 AM UTC, comment #6: 

I am closing this bug as it is a duplicate of #25397 and we have more information in that new bug report.

Fred Kiefer <FredKiefer>
Group Member
Wed 17 Dec 2008 09:07:11 PM UTC, comment #5: 

Turns out the reason I gave for the change was wrong, Win32FontInfo also overrides glyphIsEncoded:, so the change, though it is correct wont help here. Still I hope the fix might make your problem go away, by affectign the font replacement is NSAttributedString.

Fred Kiefer <FredKiefer>
Group Member
Wed 17 Dec 2008 08:31:25 PM UTC, comment #4: 

Now that os great, so it isn't a problem with events, it is jsut the drawing code that is not working for certain characters.

My first idea, what may be causing this is the way we generate glyphs for a font. The default code here looks like this:

- (BOOL) glyphIsEncoded: (NSGlyph)aGlyph;
{
  // FIXME: This is a hack for aGlyph == theChar fonts.
  if (coveredCharacterSet == nil)
    {
      [self coveredCharacterSet];
    }
  return [coveredCharacterSet characterIsMember: (unichar)aGlyph];
}

That is, we only generate our "glyph" when we know the font supports the character. This could be the problem for you.

Looking at the code that tries to find the covered character set for a windows font I see an issue that might stop that code from working, the cbThis part of the GLYPHSET isn't set and Windows is rather paticular about those values.
I will change this and you could give it a try.

Fred Kiefer <FredKiefer>
Group Member
Tue 16 Dec 2008 11:22:17 PM UTC, comment #3: 

when running GSTest, Keyboard Input Test it tells me, for @

keycode: 192
characters: @
charactersIgnoringModifiers: @
modifiers: control+alternate

which looks about correct.

very similar for #, [, ]
for {, }, shift is added


Riccardo Mottola <rmottola>
Group Member
Fri 12 Dec 2008 03:51:38 PM UTC, comment #2: 

indeed. It didn't help. I just get a big beep when typing @.
Unfortunately, @ is an important character!

Riccardo Mottola <rmottola>
Group Member
Tue 09 Dec 2008 09:08:53 PM UTC, comment #1: 

The problem here is that we don't use TranslateMessage() in the message loop, that way we only get the raw key up and down events, not that translated char events. But if we change to that we have no way of handling non-character key events correctly. What we need is some sort of TranslateMessage() replacement that would just result in the characters for the key event, sadly I don't know if anything like this exists at all and would also not know how to write it.

I had a deeper look into what Windows offers here and the function ToUnicode() that we are using is almost the best to do the key down message to string conversion. The only better solution would be ToUnicodeEx() which allows to hand in a keyboard layout as well. Could you please test if this makes any difference for you, if it does I will update the code.

You will need to change the line

result = ToUnicode(wParam, scan, keyState, unicode, 5, 0);

inot something like

result = ToUnicodeEx(wParam, scan, keyState, unicode, 5, 0, GetKeyboardLayout(0));

But I expect this not to change anything.


Fred Kiefer <FredKiefer>
Group Member
Wed 03 Dec 2008 04:41:02 PM UTC, original submission:  

With an italian keyboard, certain characters need to be typed as a combination of alt-grey (right alt) and another key. Examples are
@ [] {}

Typing these doesn't work on gnustep, inside textfields I just get a beep.

Riccardo Mottola <rmottola>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by FredKiefer (Posted a comment)
  • -email is unavailable- added by rmottola (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-01-28 FredKiefer StatusNone Duplicate
        Open/ClosedOpen Closed
        Dependencies- Depends on bugs #25397
    2008-12-17 FredKiefer Assigned toNone FredKiefer

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code