edenzik / macvim

Automatically exported from code.google.com/p/macvim
0 stars 0 forks source link

Adding a per-buffer option to override system-level function key bindings #182

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
IMPORTANT! Before creating a new Issue please search the old Issues for 
duplicates.  Also, 
please do not use this page to ask questions, instead post to the vim_mac 
mailing list.  There are 
more people on that list that can answer questions.  Only file an issue if you 
have found a bug.  
(You can safely delete this text now that you have read it and enter an issue 
report.  Thank you 
for taking the time to report new bugs!)

What steps will reproduce the problem?
N/A

What is the expected output? What do you see instead?
On modern mac keyboards, most function keys on the keyboard are already mapped 
to system 
functions (Exposé, sound volume etc.), making them unavailable to vim for 
mapping purposes. 
While these system-level mappings can be disabled through System Preferences, 
most mac users 
had already developed muscle memory to those mappings. I propose the addition 
of a per-buffer 
option similar to macmeta that disables those system-level mappings when the 
user switches to 
a buffer with this option set.

What version of MacVim and OS X are you using (see "MacVim->About MacVim" and  
"Apple 
Menu->About This Mac" menu items, e.g. "Snapshot 40, 10.5.6 Intel")?
Snapshot 45

Please provide any additional information below.
On some mac keyboards, F6 also doubles as the num lock key. 

Original issue reported on code.google.com by yuan...@gmail.com on 3 Jun 2009 at 5:23

GoogleCodeExporter commented 9 years ago
I think this would be possible using an Event Tap but only if "Assistive 
Devices" have been enabled in the 
"Universal Access" System Preferences pane.  That is, it may be possible to 
implement, but it would be a great 
hack.  Still, I'd consider merging such a patch if you send me one!

Original comment by bjorn.winckler@gmail.com on 3 Jun 2009 at 8:12

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Could TISSetInputMethodKeyboardLayoutOverride be used instead to solve this 
problem? If I am not mistaken, 
this allows keyboard layouts to be switched programmatically and replaces 
deprecated Keyboard Layout Services 
in Mac OS X 10.5.

Original comment by yuan...@gmail.com on 3 Jun 2009 at 9:14

GoogleCodeExporter commented 9 years ago
I don't know.  Please investigate and let me know how it goes.

Original comment by bjorn.winckler@gmail.com on 5 Jun 2009 at 7:04