2023-02-19 16:22:32 +00:00
|
|
|
# Description: Change key bindings for comfortable use with Colemak keyboard
|
|
|
|
# layout. This diff was made in 4.7 release version of nnn.
|
2022-07-09 11:42:38 +00:00
|
|
|
#
|
2023-02-19 16:22:32 +00:00
|
|
|
# Author: github.com/jacmoe
|
2022-07-09 11:42:38 +00:00
|
|
|
diff --git a/src/nnn.c b/src/nnn.c
|
2023-02-19 16:22:32 +00:00
|
|
|
index b351e202..71193476 100644
|
2022-07-09 11:42:38 +00:00
|
|
|
--- a/src/nnn.c
|
|
|
|
+++ b/src/nnn.c
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -5050,32 +5050,32 @@ static void show_help(const char *path)
|
2022-07-09 11:42:38 +00:00
|
|
|
const char helpstr[] = {
|
|
|
|
"0\n"
|
|
|
|
"1NAVIGATION\n"
|
|
|
|
- "9Up k Up%-16cPgUp ^U Page up\n"
|
|
|
|
- "9Dn j Down%-14cPgDn ^D Page down\n"
|
2023-02-19 16:22:32 +00:00
|
|
|
+ "9Up e Up%-16cPgUp ^U Page up\n"
|
|
|
|
+ "9Dn n Down%-14cPgDn ^D Page down\n"
|
|
|
|
"9Lt h Parent%-12c~ ` @ - ~, /, start, prev\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
- "5Ret Rt l Open%-20c' First file/match\n"
|
2022-07-31 14:10:50 +00:00
|
|
|
- "9g ^A Top%-21cJ Jump to entry/offset\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
- "9G ^E End%-20c^J Toggle auto-advance on open\n"
|
|
|
|
+ "5Ret Rt i Open%-20c' First file/match\n"
|
2022-07-31 14:10:50 +00:00
|
|
|
+ "9g ^E Top%-21cJ Jump to entry/offset\n"
|
2023-02-19 16:22:32 +00:00
|
|
|
+ "9G ^N End%-20c^J Toggle auto-advance on open\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"8B (,) Book(mark)%-11cb ^/ Select bookmark\n"
|
|
|
|
"a1-4 Context%-11c(Sh)Tab Cycle/new context\n"
|
|
|
|
"62Esc ^Q Quit%-20cq Quit context\n"
|
|
|
|
"b^G QuitCD%-18cQ Pick/err, quit\n"
|
|
|
|
"0\n"
|
|
|
|
"1FILTER & PROMPT\n"
|
|
|
|
- "c/ Filter%-17c^N Toggle type-to-nav\n"
|
2023-02-19 16:22:32 +00:00
|
|
|
+ "c/ Filter%-17c^M Toggle type-to-nav\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"aEsc Exit prompt%-12c^L Toggle last filter\n"
|
2022-07-31 14:10:50 +00:00
|
|
|
"c. Toggle hidden%-5cAlt+Esc Unfilter, quit context\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"0\n"
|
|
|
|
"1FILES\n"
|
|
|
|
- "9o ^O Open with%-15cn Create new/link\n"
|
|
|
|
+ "9o ^O Open with%-15cc Create new/link\n"
|
2023-02-19 16:22:32 +00:00
|
|
|
"9f ^F File stats%-14cd Detail mode toggle\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"b^R Rename/dup%-14cr Batch rename\n"
|
|
|
|
- "cz Archive%-17ce Edit file\n"
|
|
|
|
+ "cz Archive%-17cy Edit file\n"
|
|
|
|
"c* Toggle exe%-14c> Export list\n"
|
2023-02-19 16:22:32 +00:00
|
|
|
"6Space + (Un)select%-12cm-m Select range/clear\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"ca Select all%-14cA Invert sel\n"
|
|
|
|
"9p ^P Copy here%-12cw ^W Cp/mv sel as\n"
|
|
|
|
- "9v ^V Move here%-15cE Edit sel list\n"
|
|
|
|
+ "9v ^V Move here%-15cl Edit sel list\n"
|
2023-01-29 22:05:49 +00:00
|
|
|
"9x ^X Delete%-18cS Listed sel size\n"
|
|
|
|
"aEsc Send to FIFO\n"
|
2022-07-09 11:42:38 +00:00
|
|
|
"0\n"
|
|
|
|
diff --git a/src/nnn.h b/src/nnn.h
|
2023-02-19 16:22:32 +00:00
|
|
|
index 3e4ea19c..b0eb7cdb 100644
|
2022-07-09 11:42:38 +00:00
|
|
|
--- a/src/nnn.h
|
|
|
|
+++ b/src/nnn.h
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -137,12 +137,12 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
{ '\r', SEL_OPEN },
|
|
|
|
/* Pure navigate inside */
|
|
|
|
{ KEY_RIGHT, SEL_NAV_IN },
|
|
|
|
- { 'l', SEL_NAV_IN },
|
|
|
|
+ { 'i', SEL_NAV_IN },
|
|
|
|
/* Next */
|
|
|
|
- { 'j', SEL_NEXT },
|
|
|
|
+ { 'n', SEL_NEXT },
|
|
|
|
{ KEY_DOWN, SEL_NEXT },
|
|
|
|
/* Previous */
|
|
|
|
- { 'k', SEL_PREV },
|
|
|
|
+ { 'e', SEL_PREV },
|
|
|
|
{ KEY_UP, SEL_PREV },
|
|
|
|
/* Page down */
|
|
|
|
{ KEY_NPAGE, SEL_PGDN },
|
2023-01-29 22:05:49 +00:00
|
|
|
@@ -155,11 +155,11 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
/* First entry */
|
|
|
|
{ KEY_HOME, SEL_HOME },
|
|
|
|
{ 'g', SEL_HOME },
|
|
|
|
- { CONTROL('A'), SEL_HOME },
|
|
|
|
+ { CONTROL('E'), SEL_HOME },
|
|
|
|
/* Last entry */
|
|
|
|
{ KEY_END, SEL_END },
|
|
|
|
{ 'G', SEL_END },
|
|
|
|
- { CONTROL('E'), SEL_END },
|
|
|
|
+ { CONTROL('N'), SEL_END },
|
|
|
|
/* Go to first file */
|
|
|
|
{ '\'', SEL_FIRST },
|
2022-07-31 14:10:50 +00:00
|
|
|
/* Jump to an entry number/offset */
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -199,7 +199,7 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
/* Filter */
|
|
|
|
{ '/', SEL_FLTR },
|
|
|
|
/* Toggle filter mode */
|
|
|
|
- { CONTROL('N'), SEL_MFLTR },
|
2023-02-19 16:22:32 +00:00
|
|
|
+ { CONTROL('M'), SEL_MFLTR },
|
2022-07-09 11:42:38 +00:00
|
|
|
/* Toggle hide .dot files */
|
|
|
|
{ '.', SEL_HIDDEN },
|
|
|
|
/* Detailed listing */
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -226,7 +226,7 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
/* Invert selection in current dir */
|
|
|
|
{ 'A', SEL_SELINV },
|
|
|
|
/* List, edit selection */
|
|
|
|
- { 'E', SEL_SELEDIT },
|
|
|
|
+ { 'l', SEL_SELEDIT },
|
|
|
|
/* Copy from selection buffer */
|
|
|
|
{ 'p', SEL_CP },
|
|
|
|
{ CONTROL('P'), SEL_CP },
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -243,7 +243,7 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
{ 'o', SEL_OPENWITH },
|
|
|
|
{ CONTROL('O'), SEL_OPENWITH },
|
|
|
|
/* Create a new file */
|
|
|
|
- { 'n', SEL_NEW },
|
|
|
|
+ { 'c', SEL_NEW },
|
|
|
|
/* Show rename prompt */
|
|
|
|
{ CONTROL('R'), SEL_RENAME },
|
|
|
|
/* Rename contents of current dir */
|
2023-02-19 16:22:32 +00:00
|
|
|
@@ -255,7 +255,7 @@ static struct key bindings[] = {
|
2022-07-09 11:42:38 +00:00
|
|
|
/* Toggle auto-advance on file open */
|
|
|
|
{ CONTROL('J'), SEL_AUTONEXT },
|
|
|
|
/* Edit in EDITOR */
|
|
|
|
- { 'e', SEL_EDIT },
|
|
|
|
+ { 'y', SEL_EDIT },
|
|
|
|
/* Run a plugin */
|
|
|
|
{ ';', SEL_PLUGIN },
|
2023-01-29 22:05:49 +00:00
|
|
|
/* Show total size of listed selection */
|