Rebind Rules Rambling

This post contains everything I’ve identified as a potential issue for rebind rules and my opinion on it. It would not have been possible without the countless discussions on searchcraft-/linuxcord, so a big thank you to all involuntary contributors!

Note that parts of this are just me giving my opinion, most of the conclusions are arbitrary, feel free to voice any disagreements in the comments. I also don’t claim 100% accuracy, it’s very easy to miss something with such a convoluted topic.

Edit: I accidentally hit the post button too early so there’s currently some missing links I’d like to add and lackluster formatting, I’ll try to fix it later.

Cursor state rebinds

Cursor state rebinds are not a new thing, though they have become increasingly popular with the arrival of Toolscreen. What I refer to as cursor state rebinds here is any behavior that changes the function of a key depending on whether the player is “in game” or in some sort of GUI (including the regular inventory), I think it’s usually achieved using StateOutput. I believe the first use case of this was for resize macros, so the game window wouldn’t be resized when in pause menus. This was an upgrade from the previous method of using the fullscreen keybind to achieve the same thing. Since then, they have evolved, now people change their F3 key to not activate when in inventory. More questionable use cases for this are having F3 and chat, home or perspective on the same key. I straight up don’t think this sort of behavior should be allowed as i don’t think it’s possible to replicate in vanilla minecraft without the help of external tools. It’s essentially double binding, one key can get two different functions it previously couldn’t do (especially in the instance of home+chat on the same key). There’s probably too much precedent to ban all instances of it, but I’d appreciate it if it was banned for everything but resizing at least. This obviously doesn’t include keybinds used outside of gameplay (ie. for resetting).

Layer behavior

On regular keyboards, there is some sort of continuity between the regular keyboard layer and the shift layer, i.e. if you press a, shift+a will result in the upper case variant of that letter, A. There’s some exceptions to this, on the default German keyboard, pressing shift+ß will not result in ẞ, but in a diacritic. I don’t think these exceptions are enough to really do anything. In the context of MCSR, this “keyboard mechanic” has long been dismissed and shift layers have meant swapping characters out when pressing shift (i.e. shift+a->b). While I personally don’t think this is problematic, it’s still noteworthy.

A more important issue here happens for non latin keyboards, or rather scripts without upper case letters (Thai, Hebrew, …). On these keyboards, the letter you type when pressing shift does completely change. The question arises whether you should be able to mix characters from the shift and the non shift layer together or if you should have to preserve the original shift state of those letters. For Yiddish, this would mean only one layer would be able to type Hebrew characters, that same layer also wouldn’t be allowed to type “:de” for powder+eyes as latin characters are only found on the shift layer of the default Hebrew keyboard. For Thai it would mean that some crafts would end up scattered across layers. Purely for “language diversity” and the fact that a default layout for Thai is difficult to define, I’d argue shift states can be ignored, but it’s still a factor to be considered. On the other hand, preserving shift states would solve other issues issues such as having a and A on the same layer being allowed without any additional clarifications.

The last edge case with layers is the control layer, which you can activate by pressing control. By default, keys here don’t type (you could argue that ctrl+v can be interpreted as typing, but that’s a special case), but they can be made to type through MSKLC. This results in what was originally believed to be unintentional behavior, but I believe it to be completely intentional: First, the ctrl keyboard combination is executed, then the specified letter is typed. This can be abused with ctrl+a, which highlights all text. If you bind some letter to a on the control layer, ctrl+a will select all text and replace it with that letter, which should not be allowed in my opinion. Therefore, I think outright banning the use of control layers for typing is reasonable, but it should still be allowed to execute commands like ctrl+a/v.

Double binds

As per the current rules, double binding is banned. This should probably also apply to typing, but is not as clear cut as it seems. If you consider a and A to be different game inputs, there’s nothing stopping you from putting them both on the same layer, so this behavior should probably be explicitly banned as it’s just double binding in disguise.

A second thing to consider is the shift key: As of right now, it’s legal to bind a character to the same key on the base and the shift layer, even if that character only occurs once (ie. Thai/Hebrew characters, some special characters like : and _, probably also letters like ß, but they do technically occur on alt layers on Linux keyboards). This is called “transparent keys” and I frankly don’t really see a justification for it. The shift key is kind of inherently a layer changing key, so selectively pretending it isn’t while it gets to keep its function as the key to instantly move items in the inventory AND at the same time still be a layer changing key for arbitrarily chosen characters is kind of weird to me. I do understand that disallowing this would nerf Yiddish and Thai (I don’t know to what extent), but it’s also kind of hard to argue that the characters present on both layers are not just double binds or are enabled by a shift key that both is and isn’t a layer changing key. One last thing with transparent keys being allowed is that you could argue putting a on the default layer, letting it bleed through onto the shift layer and then putting A somewhere else on that layout is legal, which would again be double binding by “community consensus”.

Function Keys

A function key is a key which by itself (by default) can’t type, but takes on some sort of function, examples for this are ctrl, shift, backspace, F3. Another quirk they have is that their position across layers doesn’t (and probably shouldn’t) change. It is possible to make at least some these keys type while keeping their original function by rebinding them with (edited) MSKLC on Windows or xkb on Linux. While it’s probably possible with other keys aswell, F3 is the one with the most (only?) actual utility. I don’t think this should be allowed as keyboards don’t normally function this way. There is also historical precedent for this, until Toolscreen, people mostly weren’t aware of this possibility and created search crafting layouts while carefully avoiding the F3 key. Please note that banning this without also banning cursor state rebinds for this purpose would change nothing, cursor state rebinds can be used to achieve the exact same thing. Another factor here is function keys not used by Minecraft (think F13-24), these are generally used instead of regular keys to avoid weird F3 combinations (ie. F3+p) when people are too lazy to figure out which key without F3 functionality is still free, which honestly… fair enough, allowing these to type probably won’t change anything.

Another point of contention seems to be the space key. In Minecraft, it takes on the function of tab+space, it also has some of the behavior of a function key in that it doesn’t change output/function on different layers. I assume it’s for these reasons that @r0hkx said the following: “you probably shouldn’t rebind the space character separately from the space scan code input (so typing space and tab+space should always be the same physical key)” I personally disagree with this assessment, I don’t think the space character is really special in any way and you should be able to rebind it independently of the space scancode; so you should be able to use the character once per layer and keep the scancode on the physical space key, which itself would have to be rebound in that scenario. Looking at some of the layouts in #layout-showcase in searchcraftcord, this seems to be the consensus the community came to regardless of r0hkx’ statement.

IMEs

IMEs are a bit tricky, they are explicitly allowed (afaik) and constitute the “default input method” for their respective languages (more on that below). One issue is platform parity, on Linux, they don’t work at all and don’t recognize the search field in my experience (there is a mod to make them work, though I haven’t tried it and I don’t think anybody wants a mod legalized just for this), on Windows, their performance seems to be very inconsistent (they work somewhat fine for me, but @trawa couldn’t move ingame when using them) and on Mac they seem to work fine. I don’t know what it would take to make them work somewhat similarly everywhere, but I do know that is not work anybody will want to do. The second issue is that they have user specified phrases, so you could bind all relevant text to single keypresses (it would be two presses in total to type them, you’d still have to select the correct ones). I believe behavior like this should be banned as it feels like macroing. There’s also the fact that even without that, they adapt to user behavior and are therefore (in the context of MCSR) not deterministic, which I find to be odd. With all that said, I don’t really know what to make of them, they won’t really have any impact unless user defined phrases are explicitly allowed, so I don’t really care about them either way.

Arabic/Farsi

For anybody unaware of the issue: The characters of the Arabic script (used for both Arabic and Farsi) change form depending on what position they occur in (ie. if they are at the start or the end of a word). In older versions Mojang decided to hardcode those positions into the game and used a legacy set of unicode characters for this, which are not the same as the ones used on a normal Arabic keyboard. Therefore, most searches for regular Arabic letters don’t result in anything and you need to bind those special legacy unicode characters to your keyboard to search in those languages. This means that the size of the alphabet is artificially quadrupled, which immensely helps for search crafting: If legalized, Farsi would probably be the best language. The easy solution to this problem would be to outright ban the use of these characters as they don’t appear on any default keyboard layout, but then there’s issues with other languages like Vietnamese or Upside Down, who also use keys which don’t occur anywhere, and it’s kinda hard to police the use of individual characters which by themselves don’t seem abnormal/cheaty. The other solution would be to allow them, which would go against the “default input method” principle (more on that later). A third solution (which will never happen) would be to implement @tildejustin’s fix, which fixes the odd behavior, but would also make Farsi borderline useless for search crafting to our understanding and would change game files for absolutely no reason other than to allow more languages. I don’t care that much either way, I don’t think allowing them would make a huge impact as a lot of people prefer using latin script based languages for readability and Farsi wouldn’t be a major improvement over the current best languages anyways (I’d still try it out though…).

Current rules

I don’t think it’s possible to write a single one size fits all solution for whatever people deem allowed right now, there’s too many exceptions for certain languages. The most obvious one is Farsi/Arabic being banned, but Upside Down/Vietnamese being allowed, but basically everything mentioned thusfar also results in some inconsistency between different languages.

Proposals

  • Default Input Method

I’ve thrown this term around a bunch, here’s finally an explanation. “Default input method” refers to the solution the speedrun.com moderation team wants to get closest to by trying to emulate how regular keyboards work as much as possible (this is my understanding at least). Some of the issues with this have already been mentioned (key continuity between layers, no double characters, …), but there’s more. Due to way too much precedence, I don’t think its strictest forms will be implemented (that would essentially mean single layer for every language), but it will act more as a guiding principle rather than a strict rule. The main thing it tries to tackle is what characters you are allowed to use, but even then there is uncertainty. One example is Luxembourgish, the default keyboard for it doesn’t have the character ë as its own key, but it’s somewhat important for the language. It is also hard to define what counts as the default layout for any language as a lot of languages have multiple options. Therefore, the solution seems to be to allow all characters that occur on any layout, you are then allowed to mix characters from all layouts. For this you’d have to compile a list of all characters from all layouts on all major platforms. @tildejustin had the opposite approach and created a list with all characters that don’t appear on any layout by taking all relevant characters for search crafting and trying to find them in xkb (Linux) layouts. The result is a list which contains all characters which could be used for search crafting but don’t occur as single key presses on any keyboard. Now there’s still issues with this, the obvious one being that it only encompasses Linux keyboard layouts. The 2nd problem is that I would personally not consider some of these keyboards to be “official” enough, one such example is the “trans” layout/IPA layout: It contains a lot of characters necessary for Upside Down, but it’s basically unusable for day to day use and was (probably) made for transcription purposes, as evidenced by the name. It also brings up a third issue: Can you really consider characters that only appear on the shift+altgr layer to be “one keypress” characters? I’m a bit conflicted, you can achieve this kind of behavior with sticky keys on windows and I was in favor of not having to care about what layer a character appears on earlier, but including stuff like shift+altgr is pushing it and “feels wrong” (yeah ik great argument). One last issue is how you deal with the characters on the list. I think we can all agree that there should be some way to type them, but how many inputs should they require? The maximum I can come up with is four, as that is the amount of inputs required to copy paste them, but this is very hard to define in a practical and replicable manner for all characters and platforms. The final issue with this is that this is only for 1.16.1, for other versions, different characters are required/allowed. Keyboard layouts could also get updated, so maintaining any list of typeable/banned characters and determining how to deal with the edge cases doesn’t seem like a desirable solution to me.

  • 1 unicode per key

This is kind of self explanatory, but by itself does not work well as an all encompassing rule. Instead, it would have to be supported by some additional clarifications.


With all of that being said, here are some final words and what solution I would personally like to see in place. Just like with triangulation and filters, rebinding has seen a feature creep, but I think there is still hope/time to confine it. For this reason, I would personally suggest this set of rules: One unicode per key; no repeating unicodes anywhere (ie. no transparent keys; but honestly for the sake of “language diversity” it could also be allowed for scripts without capitalization, I don’t care too much either way. It would still introduce an unnecessary special case); no Arabic/Chinese/Farsi/Korean/Japanese(/Upside Down, no real opinion on that one tbh) characters with single keypresses; no cursor state rebinds (maybe an accessibility exception for chat+F3, but the chat key would have to be empty; maybe also an exception for resizing); no using the capitalized version of a character on the same layer as the regular version (ie. no a and A on the same layer).

4 Likes