diff --git a/src/ui/element_download_list.cc b/src/ui/element_download_list.cc index 17bc118d..3369b045 100644 --- a/src/ui/element_download_list.cc +++ b/src/ui/element_download_list.cc @@ -26,7 +26,6 @@ ElementDownloadList::ElementDownloadList() { 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[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.\""); @@ -63,7 +62,8 @@ ElementDownloadList::ElementDownloadList() { m_bindings[KEY_HOME] = m_bindings[control->ui()->navigation_key(RT_KEY_HOME)] = [this] { receive_home(); }; m_bindings[KEY_END] = m_bindings[control->ui()->navigation_key(RT_KEY_END)] = [this] { receive_end(); }; - + + m_bindings[control->ui()->navigation_key(RT_KEY_DELETE_ITEM)] = std::bind(&ElementDownloadList::receive_command, this, "branch=d.state=,d.stop=,d.erase="); m_bindings[control->ui()->navigation_key(RT_KEY_TOGGLE_LAYOUT)] = std::bind(&ElementDownloadList::toggle_layout, this); } diff --git a/src/ui/root.cc b/src/ui/root.cc index 2c7530b2..e491f0e1 100644 --- a/src/ui/root.cc +++ b/src/ui/root.cc @@ -32,14 +32,14 @@ static const int emacs_keymap[RT_KEYMAP_MAX] = { 'F' - '@', 'P' - '@', 'N' - '@', - 'l', - 'k', 'U' - '@', 'H' - '@', 'A' - '@', 'E' - '@', - 'L', - 'D' - '@' + 'D' - '@', // RT_KEY_DELETE_ITEM + 'k', // RT_KEY_DISCONNECT_PEER + 'l', // RT_KEY_DISPLAY_LOG + 'L' // RT_KEY_TOGGLE_LAYOUT }; static const int vi_keymap[RT_KEYMAP_MAX] = { @@ -47,14 +47,14 @@ static const int vi_keymap[RT_KEYMAP_MAX] = { 'l', 'k', 'j', - 'L', - 'K', 'B' - '@', 'D' - '@', 'H', 'G', - 'L' - '@', - 'x' + 'x', // RT_KEY_DELETE_ITEM + 'K', // RT_KEY_DISCONNECT_PEER + 'L', // RT_KEY_DISPLAY_LOG + 'L' - '@' // RT_KEY_TOGGLE_LAYOUT }; Root::Root() { diff --git a/src/ui/root.h b/src/ui/root.h index 02bda1e2..714c432f 100644 --- a/src/ui/root.h +++ b/src/ui/root.h @@ -28,14 +28,14 @@ enum NavigationKeymap { RT_KEY_RIGHT, RT_KEY_UP, RT_KEY_DOWN, - RT_KEY_DISPLAY_LOG, - RT_KEY_DISCONNECT_PEER, RT_KEY_PPAGE, RT_KEY_NPAGE, RT_KEY_HOME, RT_KEY_END, + RT_KEY_DELETE_ITEM, + RT_KEY_DISCONNECT_PEER, + RT_KEY_DISPLAY_LOG, RT_KEY_TOGGLE_LAYOUT, - RT_KEY_STOP, RT_KEYMAP_MAX };