Menu

trouble typing international characters

2004-04-16
2004-04-19
  • Pawel Dzierzanowski

    Hi,
    There is no way to type in polish characters in mswindows, 'programmers keyboard' layout, using right-alt.
    I suppose this is becouse right-alt is interpreted as ctrl-alt in fact.

    On the other hand, text is displayed correctly.

    What do you think?

     
    • Chris Wilson

      Chris Wilson - 2004-04-16

      There was some talk of adding an "insert special character" feature, probably similar to the one OpenOffice has. I don't know if this is what you had in mind, but it may be something that will happen in the future.

       
    • Pawel Dzierzanowski

      'insert special character' probably would be some workaround for me, but this is not what I'd like.

      I'm afraid that the problem lies in wxWindows, as the same happens with e.g. pyCrust and any other wxWindows editor I've met.

       
    • Daniel Pozmanter

      It looks like wxPython ignores the right alt key for some reason.  I recommend http://sourceforge.net/tracker/?group_id=9863&atid=109863
      reporting this as a bug.

      In any case, how is it that right alt causes the keyboard to send the correct characters?  Have you tried this with wxPython 2.5.x?  Is there any way to get another key to do the same thing?

      If there is a set difference between the character code for right-alt + the polish key (you could find this out using a non wxPython keyboard mapping utility), and
      the english language output of the same key.

      Let's say this difference is, oh, 49.

      I could do the following:

      Add a feature whereby upon hitting key "X"
      or key "comination X-Y-Z", you can either:

      1.  put DrPython in Polish mode, whereby 49 is added to the keycode of every key pressed.
      Or best of all:
      2.  have that key, when pressed, at 49 to the current keycode.

      What thoughts?

       
      • Pawel Dzierzanowski

        Oh, I don't know if this is problem with wxPython, or wxWidgets or drPython or what.
        And I think that drPython is not ignoring right-alt: I can see that when customizing shortcuts. In windows right-alt is the same as ctrl+alt (sometimes called AltGr); it's just in Polish 'programmers keyboard layout' that ctrl+alt (or just right alt) produces Polish characters.

        I've tried to explore various keyboard layouts with ms 'keyboard layout creator'. There's no standard difference between keycodes set. I could tell you what are the keycodes for Polish characters, but I'm afraid that would lead to ugly code.

        Ah, one thing:
        when customizing shortcuts in drPython, i tried various keyboard layouts. When Polish layout is active, pressing right-alt+a produces 'Control,Alt, #65'.
        But with american keyboard layout active, the same produces: 'Alt, #65' !
        It seems like in american layout right and left alts are just the same.

        Does it make any sense? Where do you think the problem is: wxWidgets, wxPython, drPython, windows maybe?

         
        • Pawel Dzierzanowski

          I've found something that may be relevant:

          "(...)We have seen that AltGr = Ctrl + Alt. So if your application needs to check the Ctrl key status (up/down), do not forget to check the Alt key status too. Ctrl can be seen down, just because the AltGr key is pressed. By not doing this, an european may not use a AltGr key correclty. "

          source:
          http://wiki.wxpython.org/index.cgi/CharacterCodesAndKeyboards

           
    • Daniel Pozmanter

      I've noted this, and added it to the todo list for the next version.

      I will add a prefs option for "European Keyboard",
      that will tell DrPython to ignore any key events where both ctrl and alt are pressed at once.

       
      • Pawel Dzierzanowski

        This is good news, thanks.

        Looking forward to the next version.

         
    • Daniel Pozmanter

      It has been plopped into cvs.  Does this work?
      (Check off "European Keyboard" in Prefs, and click "Update").

       
    • Daniel Pozmanter

      2.4.5 is out, I hope this solves the problem.

       
      • Pawel Dzierzanowski

        Key combinations that should work (for Polish characters):
        AltGr+ a z s x e c n o l

        working only: AltGr+ a e c o
        but this had worked in the previous version too.

        Checking the 'european' option on just switched off ctrl+alt key combinations, making 'switcheroo' dialog not appearing when pressing AltGr+s, but Poish "s'" character doesn't appear either.

        hmm.

         
    • Daniel Pozmanter

      Yarrrgh!

      Well, now I am good and stuck.  This was what the link told me to do!

      Tell you what, I am going to write a very small wxPython app to test this.  Email me, and I will reply with the file attached.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.