Code

configure.ac: enable automake silent-rules
[ncmpc.git] / src / screen_keydef.c
index 4519008928ef0a4642c30064d0e6b1dff1f5f42b..32791b8c0e364a2eb32eab2006e2c7d098c8442f 100644 (file)
@@ -265,11 +265,16 @@ overwrite_key(int cmd_index, int key_index)
        key = screen_getch(buf);
        g_free(buf);
 
-       if (key==ERR) {
+       if (key == ERR) {
                screen_status_printf(_("Aborted"));
                return;
        }
 
+       if (key == '\0') {
+               screen_status_printf(_("Ctrl-Space can't be used"));
+               return;
+       }
+
        cmd = find_key_command(key, cmds);
        if (cmd != CMD_NONE) {
                screen_status_printf(_("Error: key %s is already used for %s"),