From: nyov Date: Tue, 6 Dec 2011 01:26:05 +0000 (+0100) Subject: chat: HOME and END for jumping to start/end of line X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=9ee6726dc5c501d436e08b746c86034c38482089;p=xonotic%2Fdarkplaces.git chat: HOME and END for jumping to start/end of line --- 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;