Loading ...
Sorry, an error occurred while loading the content.
 

Re: Using ALT key with double-byte encoding

Expand Messages
  • Bram Moolenaar
    ... Did you mean console here? ... I thought I already said a few times that this is the wrong solution. It will cause trouble for when the double-byte
    Message 1 of 2 , Mar 23 1:25 AM
      Yasuhiro Matsumoto wrote:

      > On Sat, Mar 20, 2004 at 01:38:43PM +0100, Bram Moolenaar wrote:
      > >
      > > A long time ago Yasuhiro Matsumoto reported that mapping <M-x> doesn't
      > > work when using a double-byte encoding. I now looked into this and came
      > > to the conclusion that the solution is to avoid setting the 8th bit of
      > > the character. If we do this everywhere and use the ALT modifier it
      > > should work.
      > >
      > > However, I can only partly test this. Please try out the patch below.
      > [snip]
      >
      > Sorry, i might report without the way of reproduce.
      > on GTK, it _already_ can work with <m-x>.
      >
      > These are the environments which don't work with <m-x>
      >
      > 1. win32 gui
      > can't map <m-x>.
      > if type <m-x> 2 times on insert mode,
      >
      > 0xf8f8 is appear.
      >
      > 2. win32 gui
      > same as win32 gui.

      Did you mean "console" here?

      > I guess that vgetorpeek() cause this problem.
      > Some encoding have <m-x> in trail-byte.
      > i.e. even if i apply your patch, i can't input <m-x>.
      > With following patch, vgetorpeek accept <m-x> if typebuf have only
      > one character.

      I thought I already said a few times that this is the wrong solution.
      It will cause trouble for when the double-byte character is mapped and
      is a hack anyway.

      The right solution is to pass <M-x> not as a 'x' with the 8th bit set
      but as a 'x' with the ALT modifier. Apparently that doesn't happen
      yet on Win32.

      Strange, I would think the change in misc2.c does solve this. Perhaps
      you can find out what happens in extract_modifiers() when typing <M-x>?

      --
      In a world without walls and borders, who needs windows and gates?

      /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
      /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
      \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
      \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///
    Your message has been successfully submitted and would be delivered to recipients shortly.