diff --git a/plugins/application_swt/lib/application_swt/menu/binding_translator.rb b/plugins/application_swt/lib/application_swt/menu/binding_translator.rb index f247ae7fb..1619a5154 100644 --- a/plugins/application_swt/lib/application_swt/menu/binding_translator.rb +++ b/plugins/application_swt/lib/application_swt/menu/binding_translator.rb @@ -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 diff --git a/plugins/application_swt/spec/application_swt/menu/binding_translator_spec.rb b/plugins/application_swt/spec/application_swt/menu/binding_translator_spec.rb index 72bbe1180..f4e9da531 100644 --- a/plugins/application_swt/spec/application_swt/menu/binding_translator_spec.rb +++ b/plugins/application_swt/spec/application_swt/menu/binding_translator_spec.rb @@ -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 diff --git a/plugins/redcar/redcar.rb b/plugins/redcar/redcar.rb index 1e11c0aae..bfb368ba4 100644 --- a/plugins/redcar/redcar.rb +++ b/plugins/redcar/redcar.rb @@ -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]