diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc index 9623c242..17bc118d 100644 --- a/src/ui/element_download_list.cc +++ b/src/ui/element_download_list.cc @@ -25,11 +25,11 @@ ElementDownloadList::ElementDownloadList() { if (m_view == NULL) throw torrent::internal_error("View \"main\" must be present to initialize the main display."); - m_bindings['\x13'] = std::bind(&ElementDownloadList::receive_command, this, "d.start="); - m_bindings['\x04'] = std::bind(&ElementDownloadList::receive_command, this, "branch=d.state=,d.stop=,d.erase="); - m_bindings['\x0B'] = std::bind(&ElementDownloadList::receive_command, this, "d.ignore_commands.set=1; d.stop=; d.close="); - m_bindings['\x12'] = std::bind(&ElementDownloadList::receive_command, this, "d.complete.set=0; d.check_hash="); - m_bindings['\x05'] = std::bind(&ElementDownloadList::receive_command, this, "f.multicall=,f.set_create_queued=0,f.set_resize_queued=0; print=\"Queued create/resize of files in torrent.\""); + m_bindings['\x13'] = std::bind(&ElementDownloadList::receive_command, this, "d.start="); + m_bindings[KEY_STOP] = m_bindings[control->ui()->navigation_key(RT_KEY_STOP)] = std::bind(&ElementDownloadList::receive_command, this, "branch=d.state=,d.stop=,d.erase="); + m_bindings['\x0B'] = std::bind(&ElementDownloadList::receive_command, this, "d.ignore_commands.set=1; d.stop=; d.close="); + m_bindings['\x12'] = std::bind(&ElementDownloadList::receive_command, this, "d.complete.set=0; d.check_hash="); + m_bindings['\x05'] = std::bind(&ElementDownloadList::receive_command, this, "f.multicall=,f.set_create_queued=0,f.set_resize_queued=0; print=\"Queued create/resize of files in torrent.\""); m_bindings['+'] = std::bind(&ElementDownloadList::receive_next_priority, this); m_bindings['-'] = std::bind(&ElementDownloadList::receive_prev_priority, this); diff --git a/src/ui/root.cc b/src/ui/root.cc index 3f7ee0ec..463ba916 100644 --- a/src/ui/root.cc +++ b/src/ui/root.cc @@ -38,7 +38,8 @@ static const int emacs_keymap[RT_KEYMAP_MAX] = { 'H' - '@', 'A' - '@', 'E' - '@', - 'L' + 'L', + 'D' - '@' // could be null instead to avoid confusion }; static const int vi_keymap[RT_KEYMAP_MAX] = { @@ -52,7 +53,8 @@ static const int vi_keymap[RT_KEYMAP_MAX] = { 'D' - '@', 'H', 'G', - 'L' - '@' + 'L' - '@', + 'x' }; Root::Root() { diff --git a/src/ui/root.h b/src/ui/root.h index d7f6d313..02bda1e2 100644 --- a/src/ui/root.h +++ b/src/ui/root.h @@ -35,7 +35,8 @@ enum NavigationKeymap { RT_KEY_HOME, RT_KEY_END, RT_KEY_TOGGLE_LAYOUT, - RT_KEYMAP_MAX, + RT_KEY_STOP, + RT_KEYMAP_MAX }; class DownloadList;