Cross platform keybindings
17 November 2009
x comments
What should the syntax for declaring them look like? At the moment I’m using a hash of platforms, but it feels a bit verbose…. any ideas?
class NewCommand < Command
key :osx => "Cmd+N",
:linux => "Ctrl+N",
:windows => "Ctrl+N"
def execute
tab = win.new_tab(Redcar::EditTab)
tab.focus
end
end
@danlucraft