maruohon / malilib

Library mod for masa's client-side Minecraft mods
GNU Lesser General Public License v3.0
294 stars 124 forks source link

Keybinds suck in text boxes #76

Closed UltraBlackLinux closed 2 years ago

UltraBlackLinux commented 2 years ago

Hey there, I'm noticing some scuffed behavior in text boxes:

maruohon commented 2 years ago

Can you give more context? Which text boxes are you referring to? I assume malilib text boxes such as in some of my config GUIs? Or what do you mean by keybind in this context? Are those your own malilib keybinds in some mod, that you are trying to use in a text field in some GUI?

For example Ctrl + A is not a default keybind in any of my mods, and in the context of selecting the contents of a text field it's also not a keybind, but rather just a special key combination checked by the text field widget directly.

I just tested Ctrl + A and Ctrl + C and Ctrl + V in the malilib text fields in both 1.12.2 and 1.18.1 and they seem to work properly/as expected in both versions. The vanilla anvil GUI however does not seem to allow even copying text out from the text field...

UltraBlackLinux commented 2 years ago

Can you give more context? Which text boxes are you referring to? I assume malilib text boxes such as in some of my config GUIs? Or what do you mean by keybind in this context? Are those your own malilib keybinds in some mod, that you are trying to use in a text field in some GUI?

For example Ctrl + A is not a default keybind in any of my mods, and in the context of selecting the contents of a text field it's also not a keybind, but rather just a special key combination checked by the text field widget directly.

I just tested Ctrl + A and Ctrl + C and Ctrl + V in the malilib text fields in both 1.12.2 and 1.18.1 and they seem to work properly/as expected in both versions. The vanilla anvil GUI however does not seem to allow even copying text out from the text field...

The mod with the problems is advanced chat, but I expected it to be an issue with malilib as it's apparently using that for it's config screen.

maruohon commented 2 years ago

You still didn't give me basically any information to track down what/where is broken. Where exactly does this happen? Which keyboard layout are you using, is it something other than QWERTY? Are you playing on Windows, Linux, Mac or on a phone via something like Pojav launcher (or whatever it was called)? Playing via Pojav is known to cause issues with inputs/keys/keybinds.

I installed AdvancedChat (all of its modules), and I tried Ctrl + A and Ctrl + C both in the custom chat input text field, and in a config menu text field. Bot worked correctly, the a or c keys didn't leak through. So I'm now basically just wasting my time trying to figure out what exactly and where is broken since you don't give me proper exact information.

UltraBlackLinux commented 2 years ago

Oh sorry. QUERTZ on Linux. I just tested it, and I can confirm that it must be a problem with malilib since the same problem occurs in the Tweakaroo config screen. - Again, it happens in EVERY text box, like the ones in the "Generic" tab of Tweakerooo I can also confirm that this even happens with the bare minimum of mods - malilib and Tweakerooo

UltraBlackLinux commented 2 years ago

Okay wtf. It seems like even the vanilla text boxes are borked, even without fabric

I didn't expect this day to come where I get to experience an actually stupid vanilla bug.

Sorry.

UltraBlackLinux commented 2 years ago

I found the problem.... The fix in the bottom most comment here breaks keypresses elsewhere...

maruohon commented 2 years ago

Okay that is very strange then. Do you have some special settings applied for your keys in Linux? (don't know off the top of my head how/what those would be) I'm also on Linux and I don't get the a or c keys leaking through the special key combo in any of the text fields I tested.

UltraBlackLinux commented 2 years ago

I myself only disabled capslock in KDE and mapped my right meta key to the same key as the left one via xmodmap, but I just noticed that I borked that and it did nothing