diff --git a/ChangeLog b/ChangeLog
index c0bcd87fe0afc9d0050fee44b9c633a4369bd4a2..46337df57b8b080e64ea83795b6adbc7ff95d90a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -61,6 +61,8 @@ CVS code -
   get_untranslated_kbinput()
 	- Make the ascii_digits variables ints instead of size_t's,
 	  since they will only hold very small values. (DLR)
+  get_shortcut(), get_toggle()
+	- Add debug messages. (DLR)
 
 GNU nano 1.3.5 - 2004.11.22
 - General:
diff --git a/src/winio.c b/src/winio.c
index f1e7426ee53ea63a109ae7ff898cb4b4ac3d5cb0..2ac375d8be42004640fb6d0808e3007031ddc72e 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -1437,6 +1437,10 @@ const shortcut *get_shortcut(const shortcut *s_list, int kbinput, bool
     const shortcut *s = s_list;
     size_t slen = length_of_list(s_list);
 
+#ifdef DEBUG
+    fprintf(stderr, "get_shortcut(): kbinput = %d, meta_key = %d, func_key = %d\n", kbinput, (int)*meta_key, (int)*func_key);
+#endif
+
     /* Check for shortcuts. */
     for (; slen > 0; slen--) {
 	/* We've found a shortcut if:
@@ -1480,6 +1484,10 @@ const toggle *get_toggle(int kbinput, bool meta_key)
 {
     const toggle *t = toggles;
 
+#ifdef DEBUG
+    fprintf(stderr, "get_toggle(): kbinput = %d, meta_key = %d\n", kbinput, (int)meta_key);
+#endif
+
     /* Check for toggles. */
     for (; t != NULL; t = t->next) {
 	/* We've found a toggle if meta_key is TRUE and the key is in