SSInput Improvement: ANY is the work of the devil - #5446
Merged
Merged
Conversation
A port of Daedalus' handling of input keys.
…mpts. Properly protect hardcoded macros. Prevent overbinding special macros.
I'm great at what I do.
Unit tests should return something. Addresses keybinds.
Removes keyboard language nag Maps ENTER, TAB, and BACKSPACE to BYOND key mappings.
Contributor
Author
|
Still need to do: |
francinum
marked this pull request as ready for review
September 4, 2026 00:12
| if(prefs?.hotkeys) | ||
| winset(src, null, "outputwindow.input.focus=true input.background-color=[COLOR_INPUT_ENABLED]") | ||
| for(var/key in personal_macro_set) //We don't care about the bound key, just the key itself | ||
| var/keycode = replacetext(key, regex("(Alt|Shift|Ctrl)", "g"), "") |
Contributor
There was a problem hiding this comment.
Would it be faster to compile this regex as a static reference somewhere?
Member
There was a problem hiding this comment.
It should at least be pulled out of the loop.
Contributor
Author
There was a problem hiding this comment.
Pulled both regexes out of their loop.
out-of-phaze
previously requested changes
Sep 15, 2026
renames keybinding map list renames focus chat nag var and savefile key
MistakeNot4892
approved these changes
Sep 23, 2026
MistakeNot4892
left a comment
Contributor
There was a problem hiding this comment.
Willing to give this a shot considering any issues will likely be exposed by playtesting.
Contributor
|
Going to merge this in as review was addressed and I want to see how it works during staging testing. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes
SSInput's macro set handling has been completely rewritten. The macrosets are now built per-player to allow avoiding the use of the
ANYspecial macro, which breaks the ability to copy-paste out ofoutputelements (like the chat). As well as playing havoc with the practically-undocumented ability forcommandelements to be prioritized for text input, assuming a compatible macro set is applied.Why and what will this PR improve
Focus Chat control mode is now actually usable.
Authorship
This code is inspired by the original implementation of SSInput's keybinding systems, but has been practically completely rewritten at this point.
Changelog
🆑
refactor: The way hotkeys are bound has been rewritten completely.
add: Hotkey state is now saved to your preferences.
tweak: Default hotkeys for 'Focus Chat'/'Classic' mode have been audited.
/:cl: