Git Product home page Git Product logo

Comments (3)

ConteZero avatar ConteZero commented on May 27, 2024 1

I can confirm that your code fixes the problem.
Thanks, your addon is really great!

from godot-xterm.

lihop avatar lihop commented on May 27, 2024

Hi @ConteZero, thanks for reporting this. I can reproduce the issue in this scene:

issue

It also occurs with KEY_LEFT and KEY_RIGHT when there are inputs on the left and right.

Can you try with this code instead and let me know if it fixes the problem:


func _gui_input(event):
	_native_terminal._gui_input(event)
	if event is InputEventKey and event.pressed:
		# Return to bottom of scrollback buffer if we scrolled up. Ignore modifier
		# keys pressed in isolation or if Ctrl+Shift modifier keys are pressed.
		if (
			not event.scancode in [KEY_ALT, KEY_SHIFT, KEY_CONTROL, KEY_META, KEY_MASK_CMD]
			and not (event.control and event.shift)
		):
			_native_terminal.sb_reset()

		if event.scancode in [KEY_LEFT, KEY_UP, KEY_RIGHT, KEY_DOWN, KEY_TAB]:
			accept_event()

	_handle_mouse_wheel(event)
	_handle_selection(event)

from godot-xterm.

ConteZero avatar ConteZero commented on May 27, 2024

I also encountered another problem, but I don't know if it can be related to this one.

With the same setup (scene with Terminal,Pty and other input nodes) if I execute a command with sudo the terminal screen do not show the command output, to force a refresh I need to press a key or click on other input field to switch focus.

The same command executed without sudo works as expected, the screen show the output.

ping www.google.com works
sudo ping www.google.com doesn't work

from godot-xterm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.