Skip to content

Commit

Permalink
Window cycling hardcoded to keycode 50
Browse files Browse the repository at this point in the history
Window cycling is hardcoded to happen when the Cmd key is pressed with
the key whose keycode = 50.  Having window cycling in the "Window" menu
means that window cycling stops working when the keyboard layout is
changed.  Thus revert back to the old way of dealing with this since it
seems to work better.
  • Loading branch information
b4winckler committed Jun 8, 2008
1 parent bf70f82 commit 428d1b4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
Binary file modified src/MacVim/English.lproj/MainMenu.nib/keyedobjects.nib
Binary file not shown.
6 changes: 6 additions & 0 deletions src/MacVim/MMAtsuiTextView.m
Expand Up @@ -406,6 +406,12 @@ - (BOOL)performKeyEquivalent:(NSEvent *)event
&& !(116 == [event keyCode] || 121 == [event keyCode]))
return NO;

// HACK! KeyCode 50 represent the key which switches between windows
// within an application (like Cmd+Tab is used to switch between
// applications). Return NO here, else the window switching does not work.
if ([event keyCode] == 50)
return NO;

// HACK! Let the main menu try to handle any key down event, before
// passing it on to vim, otherwise key equivalents for menus will
// effectively be disabled.
Expand Down
6 changes: 6 additions & 0 deletions src/MacVim/MMTextView.m
Expand Up @@ -640,6 +640,12 @@ - (BOOL)performKeyEquivalent:(NSEvent *)event
&& !(116 == [event keyCode] || 121 == [event keyCode]))
return NO;

// HACK! KeyCode 50 represent the key which switches between windows
// within an application (like Cmd+Tab is used to switch between
// applications). Return NO here, else the window switching does not work.
if ([event keyCode] == 50)
return NO;

// HACK! Let the main menu try to handle any key down event, before
// passing it on to vim, otherwise key equivalents for menus will
// effectively be disabled.
Expand Down
4 changes: 0 additions & 4 deletions src/MacVim/gvimrc
Expand Up @@ -83,8 +83,6 @@ an <silent> 9900.301 Window.Minimize\ All <Nop>
an <silent> 9900.310 Window.Zoom <Nop>
an <silent> 9900.311 Window.Zoom\ All <Nop>
an <silent> 9900.320 Window.Toggle\ Full\ Screen\ Mode :set invfullscreen<CR>
an <silent> 9900.325 Window.Cycle\ Through\ Windows <Nop>
an <silent> 9900.326 Window.Cycle\ Backwards\ Through\ Windows <Nop>
an 9900.330 Window.-SEP1- <Nop>
" TODO! Grey out if no tabs are visible.
an <silent> 9900.340 Window.Previous\ Tab :tabprevious<CR>
Expand Down Expand Up @@ -244,8 +242,6 @@ macm Window.Minimize\ All key=<D-M-m> action=miniaturizeAll: alt=YES
macm Window.Zoom key=<D-C-z> action=performZoom:
macm Window.Zoom\ All key=<D-M-C-z> action=zoomAll: alt=YES
macm Window.Toggle\ Full\ Screen\ Mode key=<D-F>
macm Window.Cycle\ Through\ Windows key=<D-`> action=_cycleWindows:
macm Window.Cycle\ Backwards\ Through\ Windows key=<D-S-`> action=_cycleWindowsBackwards: alt=YES
macm Window.Previous\ Tab key=<D-{>
macm Window.Next\ Tab key=<D-}>
macm Window.Bring\ All\ To\ Front action=arrangeInFront:
Expand Down

0 comments on commit 428d1b4

Please sign in to comment.