From 9ee6726dc5c501d436e08b746c86034c38482089 Mon Sep 17 00:00:00 2001 From: nyov Date: Tue, 6 Dec 2011 02:26:05 +0100 Subject: [PATCH] chat: HOME and END for jumping to start/end of line --- keys.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/keys.c b/keys.c index ef194859..8401b32f 100644 --- a/keys.c +++ b/keys.c @@ -1463,6 +1463,20 @@ Key_Message (int key, int unicode) // End Advanced Console Editing + if (key == K_HOME /*|| key == K_KP_HOME*/) + { + // TODO +CTRL for MsgKey_History_Top() or something + chat_bufferpos = 0; + return; + } + + if (key == K_END /*|| key == K_KP_END*/) + { + // TODO +CTRL for MsgKey_History_Bottom() or something + chat_bufferpos = (int)strlen(chat_buffer); + return; + } + // ctrl+key generates an ascii value < 32 and shows a char from the charmap if (unicode > 0 && unicode < 32 && utf8_enable.integer) unicode = 0xE000 + unicode; -- 2.39.2