diff --git a/doc/nanorc.sample.in b/doc/nanorc.sample.in
index 13e61e6bfc616dc3bf5f2473de5cfad12c8ad802..1800ad6642c6d49219797756d93657510d69a4b8 100644
--- a/doc/nanorc.sample.in
+++ b/doc/nanorc.sample.in
@@ -222,6 +222,9 @@
 # bind M-A casesens search
 # bind ^S research main
 
+## Set this if your backspace key sends delete most of the time (2.1.3+)
+# bind kdel backspace all
+
 
 ## Nanorc files
 # include "@PKGDATADIR@/nanorc.nanorc"
diff --git a/src/global.c b/src/global.c
index 824f93935407f305a2869e053ffd2f759c63bf79..5ca7c8d9af9ea8900bdecd62bb2ee74bef795c9c 100644
--- a/src/global.c
+++ b/src/global.c
@@ -1446,6 +1446,8 @@ sc *strtosc(int menu, char *input)
 	s->scfunc = do_enter;
     else if (!strcasecmp(input, "delete"))
 	s->scfunc = do_delete;
+    else if (!strcasecmp(input, "backspace"))
+	s->scfunc = do_backspace;
     else if (!strcasecmp(input, "refresh"))
 	s->scfunc = total_refresh;
     else if (!strcasecmp(input, "casesens")) {
diff --git a/src/rcfile.c b/src/rcfile.c
index 8e383b28fd0911fabcaabfdb9168f6b282bc1815..4481b6a44d8c0542c237c2fe2a938f0636038d9a 100644
--- a/src/rcfile.c
+++ b/src/rcfile.c
@@ -380,7 +380,7 @@ void parse_keybinding(char *ptr)
     for (i = 0; i < strlen(keycopy); i++)
 	keycopy[i] = toupper(keycopy[i]);
 
-    if (keycopy[0] != 'M' && keycopy[0] != '^' && keycopy[0] != 'F') {
+    if (keycopy[0] != 'M' && keycopy[0] != '^' && keycopy[0] != 'F' && keycopy[0] != 'K') {
 	rcfile_error(
 		N_("keybindings must begin with \"^\", \"M\", or \"F\"\n"));
 	return;
diff --git a/src/text.c b/src/text.c
index 95763cb5a94994e4730c4eb562f80c8a8914a6f2..242d9cd4b61ad3940f8e9a8347632119d93b13d3 100644
--- a/src/text.c
+++ b/src/text.c
@@ -393,6 +393,7 @@ void do_undo(void)
     fprintf(stderr, "Undo running for type %d\n", u->type);
 #endif
 
+    openfile->current_x = u->begin;
     switch(u->type) {
     case ADD:
 	action = _("text add");
@@ -413,6 +414,7 @@ void do_undo(void)
 	strcpy(&data[u->begin + strlen(u->strdata)], &f->data[u->begin]);
 	free(f->data);
 	f->data = data;
+	openfile->current_x += strlen(u->strdata);
 	break;
     case SPLIT:
 	action = _("line split");
@@ -442,7 +444,6 @@ void do_undo(void)
 
     }
     openfile->current = f;
-    openfile->current_x = u->begin;
     edit_refresh();
     statusbar(_("Undid action (%s)"), action);
     openfile->current_undo = openfile->current_undo->next;