Skip to content
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

Make kosTerminal buttons actually work #3

Open
JonnyOThan opened this issue Feb 20, 2023 · 14 comments
Open

Make kosTerminal buttons actually work #3

JonnyOThan opened this issue Feb 20, 2023 · 14 comments
Labels
enhancement New feature or request

Comments

@JonnyOThan
Copy link
Collaborator

No description provided.

@MOARdV
Copy link

MOARdV commented Feb 20, 2023

That's a lot of colliders... I think the MAS version has 85 colliders.

@JonnyOThan
Copy link
Collaborator Author

Yeah...the colliders are actually already in the model, they were just never hooked up to anything.

@MOARdV
Copy link

MOARdV commented Feb 20, 2023

I did a test page in MAS that supported text entry, enough to make sure the keyboard worked as expected. There are a few things that'd be cool to use it for outside of kOS. Like a "target celestial" page where you could start typing the name, and it'd apply the text as a filter to the list of options.

@StoneBlue
Copy link
Owner

rename your crafts... customizing crew/mission/etc logs.... Notes (like the Notes mod)... would be super-cool to be able to edit variables in cfgs, right in IVA :P ... (not to be applied till next game restart tho, of course)...
something to write up/edit/display mission plans... :P
i know... going out of scope now...

@StoneBlue
Copy link
Owner

StoneBlue commented Mar 11, 2023

Related?
Alexustas/Props-requests#35

Might be nice to get Crew Log page setup on it, so you could do text entries/edits? vOv

This also has the ALCOR Pod Cams page, that could mebbe be replaced, as well vOv

Also, seem to be two untextured (un-used/un-assigned) buttons above the "D-Pad" vOv

@StoneBlue StoneBlue added the enhancement New feature or request label Mar 11, 2023
@JonnyOThan
Copy link
Collaborator Author

Oh yikes, it’s completely implemented with rpm custom variables.

No, I’d rather just hook the keyboard directly up to the kos (as in, the mod - not the prop) terminal. Or build a more general platform within rpm for text input.

@JonnyOThan
Copy link
Collaborator Author

Yeah, outside of VR the bang-for-buck seems pretty low because the user always has a keyboard right in front of them. You’d just need some way to “lock in” like kospropmonitor does. At least the clickable keys would make it plausible that you’re able to type on that screen. And you could do something fun like animate/light up the buttons as they’re pressed on the real-life keyboard.

@StoneBlue
Copy link
Owner

@supercrazylash
Copy link

Hello, I'm thinking of potentially forking the repo to add in kOs functionality to the kOs monitor (as well as making all the buttons work with it) and making a pull request to merge it, are there any pages on the kOs monitor that wouldn't be problematic if they were replaced by a kOs page?

@JonnyOThan
Copy link
Collaborator Author

Hello, I'm thinking of potentially forking the repo to add in kOs functionality to the kOs monitor (as well as making all the buttons work with it) and making a pull request to merge it, are there any pages on the kOs monitor that wouldn't be problematic if they were replaced by a kOs page?

I'd suggest just adding it to one of the existing buttons (clicking multiple times will cycle through the pages that are assigned to that button).

Do you have a plan for how to pipe the button clicks from the colliders to the kos terminal? There are a lot of bad ways to do this, and I think the only good way involves some C# code which should probably be part of kosPropMonitor.

@supercrazylash
Copy link

supercrazylash commented Aug 12, 2023

My plan to get the collider clicks piped into the kOs terminal is to have all of the keyboard button id's be sequential for the key board for all keys except delete/modifier keys and write a custom page handler where the ButtonProcessor method has a switch-case statement that manually processes function keys/arrow keys/delete+modifier keys but, if the button id is greater than the id of the last key in the previous list, then the id of the first key not belonging to the above list will be subtracted from the id of the key pressed, the resulting number will match an index on a key map array that will contain all the characters on the keyboard, the character at the provided index will then be passed to the terminal.

I will then just write code that passes the keystrokes to kOs and the output from kOs to a custom variable that is then displayed on the kOs terminal screen.

I have a few more features planned but this is the gist of it.

My roadmap so far is:

  • Get text output from the keyboard to the terminal (backspace and shift keys work too(would a smartphone style behaviour (only the character entered after pressing the shift key is shifted) or a more caps-lockesque behaviour be preferable?))
  • cursor for functional editing (up/down and home/end don't work yet)
  • Get terminal to interface with kOs
  • add ability to store kOs commands/scripts on the function keys
  • Any other functionality I come up with/is suggested(feedback is welcome)

P.S. should I leave visual studio files with the assembly info in the git files or just the source code?

P.P.S. the kOs console is currently accessed by pressing the MJ button twice.

@JonnyOThan
Copy link
Collaborator Author

@supercrazylash you are aware of the kospropmonitor mod right? Some of your comments gives me a hunch you might not be. It already does some of the things you mention. If you’d like some feedback on your approach I’d be happy to look over what you’ve got so far.

the kOs console is currently accessed by pressing the MJ button twice.

sounds perfect!

@supercrazylash
Copy link

@JonnyOThan I am aware of kospropmonitor and I am using the source code of that project as the basis for my code, however kospropmonitor contains a series of features which are not needed and feels unnecessarily complex, that mixed with my desire to minimize dependencies is my reason to not use it's methods as they are in my implementation, thanks for the advice though. Also my code can already read the output from kOs and I am now working on input.

@supercrazylash
Copy link

supercrazylash commented Aug 25, 2023

quick status update, I got kOS input and output working as well as the cursor and command history, I also got the break key to act like ctrl+c, these changes have already been committed to my fork but I'm not making a pull request yet as I haven't added the F-key scripts feature and the page is also missing the menu bar at the top that exists in all other pages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants