Accept modifier in `key' run control keyword

This commit is contained in:
Thibault Jouan
2015-04-19 01:12:35 +00:00
parent 231e72df42
commit 6c7b01c9aa
3 changed files with 17 additions and 3 deletions

View File

@@ -65,6 +65,11 @@ module Uh
expect(env.keybinds.keys).to include :f
end
it 'registers a combined keys binding in the env' do
rc.key :f, :shift, &code
expect(env.keybinds.keys).to include %i[f shift]
end
it 'registers given block with the key binding' do
rc.key :f, &code
expect(env.keybinds[:f].call).to eq :keybind_code