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

gvim on windows does not accept Alt modifier key

Expand Messages
  • spinor
    hello, everyone when i press Alt- , it seems that gvim only takes ; it cannot detect that Alt is pressed trying
    Message 1 of 3 , Mar 2, 2013
    • 0 Attachment
      hello, everyone

      when i press Alt-<printable character>, it seems that gvim only takes
      <printable character>; it cannot detect that Alt is pressed

      trying winaltkeys seems not working:
      set winaltkeys=no

      mapping itself seems working:
      noremap <M-N> :echo "M-n works!"<CR>
      map <C-N> <M-N>

      this yields :map
      <C-N> <M-N>
      <M-N> * :echo "M-n works!"<CR>
      and Ctrl-N prints "M-n works!", while Alt-N is taken regarded as N
      resulting in searching functionality

      does anyone have idea that force gvim to interpret Alt modifier key?

      i'm using japanese patched gvim on windows 7 64bit, which is distributed
      by http://www.kaoriya.net/software/vim

      thanks

      --
      output of :version

      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Feb 14 2013 09:47:55)
      MS-Windows 64 ビット GUI 版
      適用済パッチ: 1-816
      Modified by koron.kaoriya@...
      Compiled by koron.kaoriya@...
      Big 版 with GUI. 機能の一覧 有効(+)/無効(-)
      +arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset
      +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist
      +cmdline_info +comments +conceal +cryptv
      +cscope +cursorbind +cursorshape +dialog_con_gui +diff +digraphs -dnd
      -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
      +find_in_path +float +folding -footer
      +gettext/dyn +guess_encode -hangul_input +iconv/dyn +insert_expand
      +jumplist +keymap +kaoriya +langmap +libcall +linebreak +lispindent
      +listcmds +localmap +lua/dyn +menu
      +migemo/dyn +mksession +modify_fname +mouse +mouseshape
      +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg -ole
      +path_extra +perl/dyn +persistent_undo -postscript +printer
      -profile +python/dyn +python3/dyn +quickfix +reltime +rightleft
      +ruby/dyn +scrollbind +signs +smartindent -sniff +startuptime
      +statusline -sun_workshop +syntax +tag_binary
      +tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects
      +title +toolbar +user_commands +vertsplit +virtualedit +visual
      +visualextra +viminfo +vreplace +wildignore
      +wildmenu +windows +writebackup -xfontset -xim -xterm_save +xpm_w32
      システム vimrc: "$VIM\vimrc"
      ユーザ vimrc: "$HOME\_vimrc"
      第2ユーザ vimrc: "$VIM\_vimrc"
      ユーザ exrc: "$HOME\_exrc"
      第2ユーザ exrc: "$VIM\_exrc"
      システム gvimrc: "$VIM\gvimrc"
      ユーザ gvimrc: "$HOME\_gvimrc"
      第2ユーザ gvimrc: "$VIM\_gvimrc"
      システムメニュー: "$VIMRUNTIME\menu.vim"
      コンパイル: cl -c /W3 /nologo -I. -Iproto -DHAVE_PATHDEF -DWIN32
      -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_XPM_W32
      /DMODIFIED_BY=\"koron.kaoriya@...\"
      /DDYNAMIC_MSVCRT_DLL=\"msvcr100.dll\" /DGETTEXT_DLL=\"intl.dll\"
      /D_BIND_TO_CURRENT_VCLIBS_VERSION=1 -DWINVER=0x0400
      -D_WIN32_WINNT=0x0400 /Fo.\ObjGULYHRAMD64/ /Ox /GL -DNDEBUG /MD
      -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_GUI_W32 -DDYNAMIC_ICONV
      -DDYNAMIC_GETTEXT -DDYNAMIC_MIGEMO -DFEAT_LUA -DDYNAMIC_LUA
      -DDYNAMIC_LUA_DLL=\"lua52.dll\" -DFEAT_PYTHON -DDYNAMIC_PYTHON
      -DDYNAMIC_PYTHON_DLL=\"python27.dll\" -DFEAT_PYTHON3 -DDYNAMIC_PYTHON3
      -DDYNAMIC_PYTHON3_DLL=\"python33.dll\" -DFEAT_PERL -DDYNAMIC_PERL
      -DDYNAMIC_PERL_DLL=\"perl516.dll\" -DFEAT_RUBY -DDYNAMIC_RUBY
      -DDYNAMIC_RUBY_VER=19 -DDYNAMIC_RUBY_DLL=\"msvcr80-ruby191.dll\"
      -DFEAT_BIG /Fd.\ObjGULYHRAMD64/ /Zi
      リンク: link /RELEASE /nologo /subsystem:windows /LTCG:STATUS
      oldnames.lib kernel32.lib advapi32.lib shell32.lib gdi32.lib
      comdlg32.lib ole32.lib uuid.lib /machine:AMD64 /nodefaultlib gdi32.lib
      version.lib winspool.lib comctl32.lib advapi32.lib shell32.lib
      /machine:AMD64 /nodefaultlib msvcrt.lib user32.lib
      /nodefaultlib:lua52.lib /nodefaultlib:python27.lib
      /nodefaultlib:python33.lib WSock32.lib
      ..\..\contrib\xpm\x64\lib\libXpm.lib /PDB:gvim.pdb -debug

      --
      --
      You received this message from the "vim_use" 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_use" group.
      To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
      For more options, visit https://groups.google.com/groups/opt_out.
    • 天井冴太 (AmaiSaeta)
      Hi, spinor. ... Try this. ... and check result of Alt-n and Alt-Shift-n. (Alt-n) and (Alt-Shift-n) are different. But and are same
      Message 2 of 3 , Mar 2, 2013
      • 0 Attachment
        Hi, spinor.

        2013/3/2 spinor <super_cow_power2109@...>:
        > mapping itself seems working:
        > noremap <M-N> :echo "M-n works!"<CR>
        > map <C-N> <M-N>
        >
        > this yields :map
        > <C-N> <M-N>
        > <M-N> * :echo "M-n works!"<CR>
        > and Ctrl-N prints "M-n works!", while Alt-N is taken regarded as N
        > resulting in searching functionality
        Try this.
        :noremap <M-n> :echo "FOO"<CR>
        :noremap <M-N> :echo "BAR"<CR>
        and check result of Alt-n and Alt-Shift-n.
        <M-n> (Alt-n) and <M-N> (Alt-Shift-n) are different.
        But <C-n> and <C-N> are same mapping.

        I do not know whether this is a correct behavior.
        But it is very confusion...


        --
        /********************************************************
        * 天井冴太 (AmaiSaeta)
        * mailto:amaisaeta@...
        *
        * My blogs...
        * 天井冴太的つれづれblog [天井の染み]
        * http://amaisaeta.seesaa.net/
        * AMAgrammar <> Programmer
        * http://agpg.seesaa.net/
        *
        * Google+
        * https://plus.google.com/110360324196605830601
        * FriendFeed
        * http://friendfeed.com/amaisaeta
        *******************************************************/

        --
        --
        You received this message from the "vim_use" 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_use" group.
        To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
        For more options, visit https://groups.google.com/groups/opt_out.
      • spinor
        hello, amai san ... that works fine just as i intended. thanks! ... huum... vim documentation use not it does not refer to difference between
        Message 3 of 3 , Mar 2, 2013
        • 0 Attachment
          hello, amai san

          (2013/03/03 13:10), 天井冴太 (AmaiSaeta) wrote:
          > Try this.
          > :noremap <M-n> :echo "FOO"<CR>
          > :noremap <M-N> :echo "BAR"<CR>
          > and check result of Alt-n and Alt-Shift-n.
          > <M-n> (Alt-n) and <M-N> (Alt-Shift-n) are different.
          > But <C-n> and <C-N> are same mapping.

          that works fine just as i intended. thanks!

          > I do not know whether this is a correct behavior.
          > But it is very confusion...

          huum...

          vim documentation use <C-A> not <C-a>
          it does not refer to difference between <M-n> and <M-N>, too

          vim manner is somewhat hard to get used to...

          ありがとうございました!

          --
          --
          You received this message from the "vim_use" 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_use" group.
          To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@....
          For more options, visit https://groups.google.com/groups/opt_out.
        Your message has been successfully submitted and would be delivered to recipients shortly.