Skip to content
Snippets Groups Projects
Commit 0a46f901 authored by rswindell's avatar rswindell
Browse files

Added support for DEL key (treated same as backspace).

parent ae7b1a01
No related branches found
No related tags found
No related merge requests found
...@@ -46,6 +46,8 @@ ...@@ -46,6 +46,8 @@
#include <vcl\Registry.hpp> /* TRegistry */ #include <vcl\Registry.hpp> /* TRegistry */
#pragma hdrstop #pragma hdrstop
#include "gen_defs.h" /* BS and DEL */
#define PCHAT_LEN 1000 /* Size of Private chat file */ #define PCHAT_LEN 1000 /* Size of Private chat file */
#define REG_KEY "\\Software\\Swindell\\Synchronet Chat\\" #define REG_KEY "\\Software\\Swindell\\Synchronet Chat\\"
...@@ -223,7 +225,7 @@ void __fastcall TMainForm::InputTimerTick(TObject *Sender) ...@@ -223,7 +225,7 @@ void __fastcall TMainForm::InputTimerTick(TObject *Sender)
/* Got char, display it */ /* Got char, display it */
if(ch=='\r') if(ch=='\r')
Remote->Lines->Add(""); Remote->Lines->Add("");
else if(ch=='\b') // backspace else if(ch==BS || ch==DEL) // backspace
Remote->Lines->Text Remote->Lines->Text
=Remote->Lines->Text.SetLength(Remote->Lines->Text.Length()-1); =Remote->Lines->Text.SetLength(Remote->Lines->Text.Length()-1);
else { else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment