Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 17 Jun 2013 15:16:14 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r251854 - head/usr.sbin/bsdinstall/partedit
Message-ID:  <201306171516.r5HFGEkL029158@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Mon Jun 17 15:16:14 2013
New Revision: 251854
URL: http://svnweb.freebsd.org/changeset/base/251854

Log:
  Fix bindings of keys when in the partition editor. By adding the usual input binding to the "partlist" sub window.
  This is a workaround, as for unknown yet reason the keys binded on the Partition Edition window are the one from partlist instead of the one from standard "formfield"
  
  Reported by:	alfred, nwhitehorn

Modified:
  head/usr.sbin/bsdinstall/partedit/diskeditor.c

Modified: head/usr.sbin/bsdinstall/partedit/diskeditor.c
==============================================================================
--- head/usr.sbin/bsdinstall/partedit/diskeditor.c	Mon Jun 17 15:01:40 2013	(r251853)
+++ head/usr.sbin/bsdinstall/partedit/diskeditor.c	Mon Jun 17 15:16:14 2013	(r251854)
@@ -94,6 +94,22 @@ diskeditor_show(const char *title, const
 		END_KEYS_BINDING
 	};
 
+	static DLG_KEYS_BINDING binding2[] = {
+		INPUTSTR_BINDINGS,
+		ENTERKEY_BINDINGS,
+		DLG_KEYS_DATA( DLGK_FIELD_NEXT, TAB ),
+		DLG_KEYS_DATA( DLGK_FIELD_PREV, KEY_BTAB ),
+		DLG_KEYS_DATA( DLGK_ITEM_NEXT,  CHR_NEXT ),
+		DLG_KEYS_DATA( DLGK_ITEM_NEXT,  KEY_DOWN ),
+		DLG_KEYS_DATA( DLGK_ITEM_NEXT,  KEY_NEXT ),
+		DLG_KEYS_DATA( DLGK_ITEM_PREV,  CHR_PREVIOUS ),
+		DLG_KEYS_DATA( DLGK_ITEM_PREV,  KEY_PREVIOUS ),
+		DLG_KEYS_DATA( DLGK_ITEM_PREV,  KEY_UP ),
+		DLG_KEYS_DATA( DLGK_PAGE_NEXT,  KEY_NPAGE ),
+		DLG_KEYS_DATA( DLGK_PAGE_PREV,  KEY_PPAGE ),
+		END_KEYS_BINDING
+	};
+
 	/*
 	 * Set up editor window.
 	 */
@@ -125,7 +141,7 @@ diskeditor_show(const char *title, const
 	/* Partition list sub-window */
 	partitions = dlg_sub_window(dialog, partlist_height, partlist_width,
 	    y + 3, x + 1);
-	dlg_register_window(partitions, "partlist", binding);
+	dlg_register_window(partitions, "partlist", binding2);
 	dlg_register_buttons(partitions, "partlist", buttons);
 	wattrset(partitions, menubox_attr);
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201306171516.r5HFGEkL029158>