-
Notifications
You must be signed in to change notification settings - Fork 215
Feature: Add custom serial buttons extension #821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
Code review pending, but one design suggestion. The line-ending should probably be set in each step (not globally) and be |
Yes, I can do that change. Especially to include separate CR and LF. The reason why I made the setting global and not for each button individually is because it is highly unlikely if not impossible to have more than one client device. And I believed that one device always uses the same settings. But it's an easy change so I will adapt it. 👌 |
Indeed if what you're doing it emitting to a serial-controlled KVM... but this extension is SO MUCH more useful than just that... any serial connection could be driven, so very easily could create macro/buttons for a whole bunch of common commands or snippets that you might want to emit... like "start a command", [user then types into the terminal], "emit some config stuff" , [user types some more, "end the command setup" (which would have the terminator selected to something) |
I completely agree. I think the best step would be to merge the two extensions and create a propper, highly functional and universal serial extension. I already did most of the suggested changes but some are still missing. To-Do:
One thing I noticed about the serial console extension, I don't know if it's a ME problem or a general problem, is that if I click I'm thinking about how to best combine the buttons and the serial console. Like if you press a button to send a command, should the send command also appear in the console, should the response appear in the response window i created or in the console or both, or don't we even need my response window? I agree that the best step is to combine the two extensions but I want everything to work properly together and avoid redundant functionality or things working against each other. |
To be clear here... when you are in the serial console, the keys you press are sent out the serial point so unless the remote echoes them back, you will see NOTHING. What is shown in the serial console is what the remote device is sending... it could have absolutely nothing to do with what you're typing, if anything... Imagine that your serial port is connected to an traffic signal control port, you might just get |
Assuming there are two distinct regions, pressing key OR pressing a macro button should send the bytes out the serial port (and show them in the "SENT" region). The "RECV" console region should only show what is received from the attached serial device. If it chooses to echo back what was sent to it... ONLY THEN would the console "RECV" region show anything, and what it show could be completely distinct from what the device sent. |
First, thanks for clarifying. Now i get it! 😅 So I'm proposing to following:
What do you think about that? Maybe you have other great improvements I could implement while I'm on it? |
Perfect! Just a little checkbox for the local echo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking much nicer. Are you still planning on Play/Pause ?
Still a work in progress. Frontend is finished more or less. Now working on properly combining the data from the serial terminal and the buttons and routing all traffic including local echo to the console, with normalization. Just wanted to make a commit for the progress so far. But I was waking up with my Laptop still on top of me in the middle of the night, so... I will finish the backend and then make a commit. About the pause functionality, I'm not sure if it's actually needed. I was planning on omitting it. What do you think? |
I think we can ship without pause, it's a nice to have, but not required. |
Still a work in progress. I just had to commit to update some things. Final version should be done later today |
Now everything looks fine and seems to work. I added some options to configure normalization and also added a pause button in the terminal. The last thing I want to do is some real world testing, connecting my USB-to-RS232 adapter and simulating some things. The only thing I looked at but couldn't figure out how to fix it is the issue with the focus of the terminal. When you open the terminal and then open a popover, you can't use the terminal anymore and have to close and reopen it. It has to do with this focus trap. Would be amazing if this can be fixed. |
Sounds like the modal is NOT disabling the keyboard trap. |
Adds a new extension for creating buttons to send custom commands.
Addresses discussion 101, 134, Pull request 324 and Issue 267.
Mostly used to control an external KVM so one can switch ports inside the JetKVM, but I tried to keep it as universal as possible. Would probably also work with your Serial Console Adapter. Everything is tested and all automated test passed. As it looks like many people are using the serial port to control or connect external devices, this extension could help a lot of users. Here are some screenshots:
Basic view:

Serial settings menu:

Button config menu:

Response view:
