Closed GoogleCodeExporter closed 9 years ago
In all likelihood the keyboard layout does something strange when generating
Ctrl-key combinations.
You can see what key sequences MacVim sees by enabling debug logging as
explained here:
https://github.com/b4winckler/macvim/wiki/Debugging
I suggest you compare the logs using your keyboard layout and a standard US
layout -- that should give you an idea on what is different.
Sorry, I don't have time to look into this myself at the moment.
Original comment by bjorn.winckler@gmail.com
on 19 Dec 2010 at 4:27
> In all likelihood the keyboard layout does something strange when generating
Ctrl-key combinations.
Yes. It apparently uses it as another layer to get different keys. CTRL+F is
mapped to Phi (http://en.wikipedia.org/wiki/Phi#Computing) - Unicode Character
03A6
Thank you for the debugging hint. Here is a comparison of Neo vs. US. I've
extracted the relevant lines (or which I believe to be relevant):
Neo: -[MMTextViewHelper keyDown:]@127: NSEvent: type=KeyDown loc=(0,777)
time=364109.2 flags=0x40101 win=0x0 winNum=1295 ctxt=0x0 chars="^F"
unmodchars="f" repeat=0 keyCode=31
US: -[MMTextViewHelper keyDown:]@127: NSEvent: type=KeyDown loc=(0,777)
time=364083.4 flags=0x40101 win=0x0 winNum=1294 ctxt=0x0 chars="^F"
unmodchars="f" repeat=0 keyCode=3
Neo: -[MMBackend(Private) doKeyDown:keyCode:modifiers:]@2080: key='Φ' code=0
mods=0 length=1
US: -[MMBackend(Private) doKeyDown:keyCode:modifiers:]@2080: key='^F' code=0x3
mods=0x4 length=1
Neo: -[MMBackend(Private) doKeyDown:keyCode:modifiers:]@2129: add byte [0/2]:
0xce
Neo: -[MMBackend(Private) doKeyDown:keyCode:modifiers:]@2129: add byte [1/2]:
0xa6
US: -[MMBackend(Private) doKeyDown:keyCode:modifiers:]@2129: add byte [0/1]:
0x6
In the keyDown Event they both get "^F" but that's later evaluated to Phi by
MacVim. I guess this might in theory be the correct behavior. What's strange is
that no other program so far works this way. CTRL works as usual in other tools
(like for example the non GUI Vim). I can't even get the Phi character to print
anywhere.
I think I'll try to generate a keylayout file without those mappings as I never
use them anyway.
> Sorry, I don't have time to look into this myself at the moment.
No need to apologize! I appreciate every hint and everything else you're doing
for MacVim and this seems to have helped already. I'll report back.
Original comment by lars.fra...@gmail.com
on 19 Dec 2010 at 5:13
It looks like the NEO layout is sending the wrong keyCode (it sends "31" when
it should be "3"). If you can somehow change this in your layout you should be
fine.
Original comment by bjorn.winckler@gmail.com
on 19 Dec 2010 at 5:58
Original comment by bjorn.winckler@gmail.com
on 31 Dec 2010 at 1:45
[deleted comment]
Same problem here with Svorak. The layout sends keycode 16 (Y-key on Qwerty)
which is mapped to F. Now I don't understand why normal navigation works (hjkl)
with this mapping, it's sending the 'wrong' keycode too.
Seems to be an important issue for MacVim.
Original comment by hajderr@gmail.com
on 17 Jun 2012 at 1:16
Almost all of the problems with keyboard layouts that I've come across have
been due to the keyboard layout sending unexpected key codes. Unfortunately,
it would untenable for me to accommodate all different layouts in MacVim so
instead I ask people who use custom layouts to make changes to their layouts.
In order to do so you will have to edit the layout so that it sends the same
events as e.g. the US layout when it comes to special codes like CTRL-keys
(which is what it should do in the first place).
Original comment by bjorn.winckler@gmail.com
on 17 Jun 2012 at 2:48
Well it works in terminal vim. What could be the difference?
في 17 jun 2012، الساعة 16:49، كتب macvim@googlecode.com:
Original comment by hajderr@gmail.com
on 17 Jun 2012 at 7:27
Original issue reported on code.google.com by
lars.fra...@gmail.com
on 19 Dec 2010 at 3:44