summaryrefslogtreecommitdiff
path: root/src/fe-text/gui-readline.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fe-text/gui-readline.c')
-rw-r--r--src/fe-text/gui-readline.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fe-text/gui-readline.c b/src/fe-text/gui-readline.c
index a9417de7..8008d6d6 100644
--- a/src/fe-text/gui-readline.c
+++ b/src/fe-text/gui-readline.c
@@ -29,7 +29,7 @@
#include "keyboard.h"
#include "translation.h"
-#include "screen.h"
+#include "term.h"
#include "gui-entry.h"
#include "gui-windows.h"
@@ -330,7 +330,7 @@ void readline(void)
int key;
for (;;) {
- key = screen_getch();
+ key = term_getch();
if (key == -1)
break;
@@ -485,6 +485,11 @@ static void key_insert_text(const char *data)
g_free(str);
}
+static void key_sig_stop(void)
+{
+ term_stop();
+}
+
static void sig_window_auto_changed(void)
{
command_history_next(active_win, gui_entry_get_text(active_entry));
@@ -615,9 +620,11 @@ void gui_readline_init(void)
/* inserting special input characters to line.. */
key_bind("insert_text", "Append text to line", NULL, NULL, (SIGNAL_FUNC) key_insert_text);
+ /* autoreplaces */
key_bind("multi", NULL, "return", "check_replaces;send_line", NULL);
key_bind("multi", NULL, "space", "check_replaces;insert_text ", NULL);
+ /* moving between windows */
for (n = 0; changekeys[n] != '\0'; n++) {
key = g_strdup_printf("meta-%c", changekeys[n]);
ltoa(data, n+1);
@@ -625,6 +632,9 @@ void gui_readline_init(void)
g_free(key);
}
+ /* misc */
+ key_bind("stop_irc", "Send SIGSTOP to client", "^Z", NULL, (SIGNAL_FUNC) key_sig_stop);
+
key_configure_thaw();
signal_add("window changed automatic", (SIGNAL_FUNC) sig_window_auto_changed);
@@ -681,6 +691,7 @@ void gui_readline_deinit(void)
key_unbind("insert_text", (SIGNAL_FUNC) key_insert_text);
key_unbind("change_window", (SIGNAL_FUNC) key_change_window);
+ key_unbind("stop_irc", (SIGNAL_FUNC) key_sig_stop);
keyboard_destroy(keyboard);
key_configure_thaw();