mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-06 20:55:31 +02:00
fix(term): prevent double keyboard input
Disconnects the "gui_input" signal as the _gui_input() override is working as expected now. Having this signal connected was causing it to be called twice for every input.
This commit is contained in:
parent
cf0beee0c1
commit
8cd11fdae6
2 changed files with 7 additions and 2 deletions
|
@ -57,6 +57,13 @@ class TestKeyPressed:
|
|||
await wait_for_signal(terminal.key_pressed, 1)
|
||||
assert_signal_emitted(terminal, "key_pressed")
|
||||
|
||||
func test_key_pressed_emitted_only_once_per_key_input():
|
||||
input_event.keycode = KEY_B
|
||||
input_event.unicode = "b".unicode_at(0)
|
||||
|
||||
await wait_for_signal(terminal.key_pressed, 1)
|
||||
assert_signal_emit_count(terminal, "key_pressed", 1)
|
||||
|
||||
func test_key_pressed_emits_interpreted_key_input_as_first_param():
|
||||
input_event.keycode = KEY_UP
|
||||
input_event.unicode = 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue