condab wrote in Tue Aug 15, 2017 2:40 am:I'm shocked to see that some people here have classed this as a 'problem' of all things in FlightGear. It is not a problem, and the feature is implemented to increase chat efficiency with one keyboard shortcut.
The fact that it is FG's fault that you missed the '_' key and hit another one just astounds me...
Cancel pilot-list chat if backspace on empty message.
Without this patch, it's hard to cancel pilot-list chat - only way i've found
is to press Escape repeatedly closing other windows until it reaches the
pilot-list chat. Without easy cancelling, one cannot use keyboad shortcuts for
things like flaps, gear etc.
diff --git a/Nasal/multiplayer.nas b/Nasal/multiplayer.nas
index b58e35c..0427bf9 100644
--- a/Nasal/multiplayer.nas
+++ b/Nasal/multiplayer.nas
@@ -111,7 +111,15 @@ var handle_key = func(key)
elsif (key == 8)
{
# backspace -> remove a character
-
+ if (size(input) == size(prefix))
+ {
+ # Backspace key with empty message - cancel. Otherwise the only way to
+ # cancel is <Escape> which can entail closing other windows before we
+ # get the <Escape> key.
+ removelistener(kbdlistener);
+ gui.popdown();
+ return 1;
+ }
if (size(input) > size(prefix))
{
input = substr(input, 0, size(input) - 1);
Users browsing this forum: No registered users and 3 guests