Patch 9.0.0686
Problem:    The right ALT key does not work on some MS-Windows keyboards.
Solution:   Adjust the modifiers based on GetKeyState(). (Anoton Sharonov,
            closes #11300)
Files:      src/gui_w32.c


*** ../vim-9.0.0685/src/gui_w32.c       2022-10-04 16:23:39.014042183 +0100
--- src/gui_w32.c       2022-10-07 16:27:56.098298182 +0100
***************
*** 852,857 ****
--- 852,864 ----
        modifiers |= MOD_MASK_ALT;
      if ((modifiers & MOD_MASK_CTRL) && (GetKeyState(VK_RMENU) & 0x8000))
        modifiers &= ~MOD_MASK_CTRL;
+     // Add RightALT only if it is hold alone (without Ctrl), because if AltGr
+     // is pressed, Windows claims that Ctrl is hold as well. That way we can
+     // recognize Right-ALT alone and be sure that not AltGr is hold.
+     if (!(GetKeyState(VK_CONTROL) & 0x8000)
+           &&  (GetKeyState(VK_RMENU) & 0x8000)
+           && !(GetKeyState(VK_LMENU) & 0x8000)) // seems AltGr has both set
+       modifiers |= MOD_MASK_ALT;
  
      return modifiers;
  }
*** ../vim-9.0.0685/src/version.c       2022-10-07 16:00:00.757126668 +0100
--- src/version.c       2022-10-07 16:28:23.034274878 +0100
***************
*** 701,702 ****
--- 701,704 ----
  {   /* Add new patch number below this line */
+ /**/
+     686,
  /**/

-- 
"Never be afraid to tell the world who you are."
                                        -- Anonymous

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///                                                                      \\\
\\\        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/20221007152921.97B3E1C10AE%40moolenaar.net.

Raspunde prin e-mail lui