Project

Profile

Help

Revision 1eaa501a

Added by Vincent Le Goff over 4 years ago

Replace the mechanism to type in the output widget

View differences:

src/ui/window.py
243 243
        if e.GetEventObject() is self.output:
244 244
            shortcut = key_name(key, modifiers)
245 245
            if shortcut:
246
                if len(shortcut) == 1:
247
                    self.input.AppendText(shortcut.lower())
248
                    self.input.SetFocus()
249
                elif shortcut.startswith("Shift + ") and len(shortcut) == 9:
250
                    self.input.AppendText(shortcut[8])
251
                    self.input.SetFocus()
252
                elif shortcut == "Backspace":
253
                    message = self.input.GetValue()
254
                    if message:
255
                        message = message[:-1]
256
                        self.input.SetValue(message)
257
                    self.input.SetFocus()
258
                    self.input.SetInsertionPoint(len(message) + 1)
246
                if shortcut == "Backspace" or len(shortcut) == 1 or (
247
                        shortcut.startswith("Shift +") and len(shortcut) == 9):
248
                    self.input.EmulateKeyPress(e)
259 249
        elif e.GetEventObject() == self.input:
260 250
            if key == wx.WXK_TAB:
261 251
                if self.engine.settings["options.accessibility.tab_end"]:

Also available in: Unified diff