Skip to content

Commit

Permalink
Add support for up/down arrow keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dequis committed Aug 19, 2016
1 parent 5ccc79a commit 49ff4dd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,14 @@ tmux prefix key (`` ` ``)

Once you're inside tmux-url-select, keybindings:

* `j`: down
* `k`: up
* `j` or down arrow: down
* `k` or up arrow: up
* `0`-`9`: select link by number
* `y`: yank (copy to clipboard)
* Enter or `o`: open link
* `Y` / `O`: yank or open link without closing
* `q`: quit

You can't use arrow keys because those are more complex than a single ascii
character.

## Configuration

There's a bunch of constants near the top of the file, you can modify them to
Expand Down
4 changes: 2 additions & 2 deletions tmux-url-select.pl
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ sub main_inner {

# main loop
while(defined($_ = getc)) {
$selection++ if /j/;
$selection-- if /k/;
$selection++ if /[jB]/;
$selection-- if /[kA]/;
$selection = ($_-1) if /[0-9]/;
$selection %= $match_count;
my $do_return = /[qyo\n]/;
Expand Down

0 comments on commit 49ff4dd

Please sign in to comment.