Skip to content

Commit

Permalink
Updated keybinds to use new names and not codes
Browse files Browse the repository at this point in the history
  • Loading branch information
freyamade committed Mar 16, 2019
1 parent f2bd562 commit cc04cfc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/application.cr
Original file line number Diff line number Diff line change
Expand Up @@ -161,31 +161,31 @@ module Crcophony
false
end
# Scroll up to scroll box
@app.bind("prompt", "keypress.") do |event_hub|
@app.bind("prompt", "keypress.ctrl-w") do |event_hub|
event_hub.trigger "messages", "scroll_up"
false
end
# Scroll down the scrollbox
@app.bind("prompt", "keypress.") do |event_hub|
@app.bind("prompt", "keypress.ctrl-s") do |event_hub|
event_hub.trigger "messages", "scroll_down"
false
end

# Show the Channel Switcher
@app.bind("prompt", "keypress.") do |event_hub|
@app.bind("prompt", "keypress.ctrl-k") do |event_hub|
event_hub.trigger "channels", "show"
event_hub.trigger "channel_prompt", "show"
event_hub.focus "channel_prompt"
false
end

# Move channel selection up one
@app.bind("channel_prompt", "keypress.") do |event_hub|
@app.bind("channel_prompt", "keypress.ctrl-w") do |event_hub|
event_hub.trigger "channels", "select_up"
false
end
# Move channel selection down one
@app.bind("channel_prompt", "keypress.") do |event_hub|
@app.bind("channel_prompt", "keypress.ctrl-s") do |event_hub|
event_hub.trigger "channels", "select_down"
false
end
Expand All @@ -203,7 +203,7 @@ module Crcophony
end

# Hide the Channel Switcher
@app.bind("channel_prompt", "keypress.") do |event_hub|
@app.bind("channel_prompt", "keypress.ctrl-k") do |event_hub|
event_hub.trigger "channels", "hide"
event_hub.trigger "channel_prompt", "hide"
event_hub.focus "prompt"
Expand Down

0 comments on commit cc04cfc

Please sign in to comment.