Navigation Menu

Skip to content

Commit

Permalink
attempt to use ctrl+right for next tab, and to futurely allow for arr…
Browse files Browse the repository at this point in the history
…ow keys
  • Loading branch information
rdp committed Feb 18, 2010
1 parent ee3615a commit 9ad1ce9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
Expand Up @@ -28,8 +28,10 @@ def self.key(key_string)
value += " "[0]
elsif key_string =~ /(F\d+)/
value += Swt::SWT.const_get $1
elsif key_string =~ /(right|left|up|down)/
elsif key_string =~ /(Right|Left|Up|Down)/
value += Swt::SWT.const_get 'ARROW_'+$1.upcase
elsif key_string =~ /Tab/
value += Swt::SWT::TAB
else
value += key_string[-1]
end
Expand Down
Expand Up @@ -32,10 +32,14 @@ def check(key, value)
end

it "translates arrow keys" do
check("right", Swt::SWT::ARROW_RIGHT)
check("left", Swt::SWT::ARROW_LEFT)
check("up", Swt::SWT::ARROW_UP)
check("down", Swt::SWT::ARROW_DOWN)
check("Right", Swt::SWT::ARROW_RIGHT)
check("Left", Swt::SWT::ARROW_LEFT)
check("Up", Swt::SWT::ARROW_UP)
check("Down", Swt::SWT::ARROW_DOWN)
end

it "translates tab" do
check("Tab", Swt::SWT::TAB)
end

end
Expand Down
7 changes: 3 additions & 4 deletions plugins/redcar/redcar.rb
Expand Up @@ -566,14 +566,13 @@ def self.keymaps
link "Ctrl+T", Project::FindFileCommand
link "Ctrl+Shift+Alt+O", MoveTabToOtherNotebookCommand
link "Ctrl+Alt+O", SwitchNotebookCommand
link "Ctrl+Shift+[", SwitchTabDownCommand
link "Ctrl+Shift+]", SwitchTabUpCommand

link "Ctrl+Tab", SwitchTabUpCommand
link "Ctrl+Shift+Tab", SwitchTabDownCommand
link "Ctrl+Shift+R", PluginManagerUi::ReloadLastReloadedCommand
end

win = Redcar::Keymap.build("main", [:linux, :windows]) do
link "F3", RepeatPreviousSearchForwardCommand
link "F3", RepeatPreviousSearchForwardCommand
end

[linwin, osx, win]
Expand Down

0 comments on commit 9ad1ce9

Please sign in to comment.