mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-22 00:56:18 +00:00
Fixed input key bindings.
This commit is contained in:
@@ -26,7 +26,6 @@ ElementDownloadList::ElementDownloadList() {
|
|||||||
throw torrent::internal_error("View \"main\" must be present to initialize the main display.");
|
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['\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['\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['\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['\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.\"");
|
||||||
@@ -64,6 +63,7 @@ ElementDownloadList::ElementDownloadList() {
|
|||||||
m_bindings[KEY_HOME] = m_bindings[control->ui()->navigation_key(RT_KEY_HOME)] = [this] { receive_home(); };
|
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[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);
|
m_bindings[control->ui()->navigation_key(RT_KEY_TOGGLE_LAYOUT)] = std::bind(&ElementDownloadList::toggle_layout, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+8
-8
@@ -32,14 +32,14 @@ static const int emacs_keymap[RT_KEYMAP_MAX] = {
|
|||||||
'F' - '@',
|
'F' - '@',
|
||||||
'P' - '@',
|
'P' - '@',
|
||||||
'N' - '@',
|
'N' - '@',
|
||||||
'l',
|
|
||||||
'k',
|
|
||||||
'U' - '@',
|
'U' - '@',
|
||||||
'H' - '@',
|
'H' - '@',
|
||||||
'A' - '@',
|
'A' - '@',
|
||||||
'E' - '@',
|
'E' - '@',
|
||||||
'L',
|
'D' - '@', // RT_KEY_DELETE_ITEM
|
||||||
'D' - '@'
|
'k', // RT_KEY_DISCONNECT_PEER
|
||||||
|
'l', // RT_KEY_DISPLAY_LOG
|
||||||
|
'L' // RT_KEY_TOGGLE_LAYOUT
|
||||||
};
|
};
|
||||||
|
|
||||||
static const int vi_keymap[RT_KEYMAP_MAX] = {
|
static const int vi_keymap[RT_KEYMAP_MAX] = {
|
||||||
@@ -47,14 +47,14 @@ static const int vi_keymap[RT_KEYMAP_MAX] = {
|
|||||||
'l',
|
'l',
|
||||||
'k',
|
'k',
|
||||||
'j',
|
'j',
|
||||||
'L',
|
|
||||||
'K',
|
|
||||||
'B' - '@',
|
'B' - '@',
|
||||||
'D' - '@',
|
'D' - '@',
|
||||||
'H',
|
'H',
|
||||||
'G',
|
'G',
|
||||||
'L' - '@',
|
'x', // RT_KEY_DELETE_ITEM
|
||||||
'x'
|
'K', // RT_KEY_DISCONNECT_PEER
|
||||||
|
'L', // RT_KEY_DISPLAY_LOG
|
||||||
|
'L' - '@' // RT_KEY_TOGGLE_LAYOUT
|
||||||
};
|
};
|
||||||
|
|
||||||
Root::Root() {
|
Root::Root() {
|
||||||
|
|||||||
+3
-3
@@ -28,14 +28,14 @@ enum NavigationKeymap {
|
|||||||
RT_KEY_RIGHT,
|
RT_KEY_RIGHT,
|
||||||
RT_KEY_UP,
|
RT_KEY_UP,
|
||||||
RT_KEY_DOWN,
|
RT_KEY_DOWN,
|
||||||
RT_KEY_DISPLAY_LOG,
|
|
||||||
RT_KEY_DISCONNECT_PEER,
|
|
||||||
RT_KEY_PPAGE,
|
RT_KEY_PPAGE,
|
||||||
RT_KEY_NPAGE,
|
RT_KEY_NPAGE,
|
||||||
RT_KEY_HOME,
|
RT_KEY_HOME,
|
||||||
RT_KEY_END,
|
RT_KEY_END,
|
||||||
|
RT_KEY_DELETE_ITEM,
|
||||||
|
RT_KEY_DISCONNECT_PEER,
|
||||||
|
RT_KEY_DISPLAY_LOG,
|
||||||
RT_KEY_TOGGLE_LAYOUT,
|
RT_KEY_TOGGLE_LAYOUT,
|
||||||
RT_KEY_STOP,
|
|
||||||
RT_KEYMAP_MAX
|
RT_KEYMAP_MAX
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user