diff --git a/src/global.c b/src/global.c index 431a2097..475addbe 100644 --- a/src/global.c +++ b/src/global.c @@ -69,7 +69,7 @@ int didfind = 0; /* Whether the last search found something. */ int controlleft, controlright, controlup, controldown, controlhome, controlend; -int controldelete; +int controldelete, controlshiftdelete; #ifndef NANO_TINY int shiftcontrolleft, shiftcontrolright, shiftcontrolup, shiftcontroldown; int shiftcontrolhome, shiftcontrolend; diff --git a/src/nano.c b/src/nano.c index cca042cb..c7e0ca2d 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2580,6 +2580,7 @@ int main(int argc, char **argv) controlhome = get_keycode("kHOM5", CONTROL_HOME); controlend = get_keycode("kEND5", CONTROL_END); controldelete = get_keycode("kDC5", CONTROL_DELETE); + controlshiftdelete = get_keycode("kDC6", KEY_BACKSPACE); #ifndef NANO_TINY /* Ask for the codes for Shift+Control+Left/Right/Up/Down. */ shiftcontrolleft = get_keycode("kLFT6", SHIFT_CONTROL_LEFT); diff --git a/src/proto.h b/src/proto.h index 3a1f5025..fd059b31 100644 --- a/src/proto.h +++ b/src/proto.h @@ -62,6 +62,7 @@ extern int controldown; extern int controlhome; extern int controlend; extern int controldelete; +extern int controlshiftdelete; #ifndef NANO_TINY extern int shiftcontrolleft; extern int shiftcontrolright; diff --git a/src/winio.c b/src/winio.c index 6908ee1d..cf8e8376 100644 --- a/src/winio.c +++ b/src/winio.c @@ -540,6 +540,8 @@ int parse_kbinput(WINDOW *win) return CONTROL_END; else if (retval == controldelete) return CONTROL_DELETE; + else if (retval == controlshiftdelete) + return the_code_for(do_cut_prev_word, KEY_BACKSPACE); #ifndef NANO_TINY else if (retval == shiftcontrolleft) { shift_held = TRUE; @@ -705,6 +707,7 @@ int parse_kbinput(WINDOW *win) return KEY_NPAGE; #ifdef KEY_SDC /* Slang doesn't support KEY_SDC. */ case KEY_SDC: + return KEY_BACKSPACE; #endif case DEL_CODE: if (ISSET(REBIND_DELETE))