Kerbal Inventory System (KIS)

Kerbal Inventory System (KIS)

1M Downloads

Configuration entries for KIS hotkey in settings.cfg file are ignored or create Exception in the log.

Galenmacil opened this issue ยท 5 comments

commented

This gets spammed infinitely in the log:

[EXC 22:45:05.453] ArgumentException: Input Key named: None is unknown
UnityEngine.Input.GetKeyDown (System.String name)
KIS.ModuleKISInventory.UpdateKey ()
KIS.ModuleKISInventory.Update ()

When using the following settings in settings.cfg:

inventoryKey = tab
rightHandKey = None
helmetKey = None
slotsX = 2
slotsY = 4
slotSize = 50
itemIconResolution = 128
selfIconResolution = 128
maxVolume = 300
openSndPath = KIS/Sounds/inventoryOpen
closeSndPath = KIS/Sounds/inventoryClose
slotHotkeysEnabled = false
slotHotkey1 = None
slotHotkey2 = None
slotHotkey3 = None
slotHotkey4 = None
slotHotkey5 = None
slotHotkey6 = None
slotHotkey7 = None
slotHotkey8 = None

Entries in bold are not respected in game. I.E.: Settings slotHotkeyx to anything revert it back to it's default. SlotHotkeysEnabled Boolean is also ignored.

Unless the KIS hotkeys are properly disabled when entering text in a text box (like a flag description), disabling them is the only option...

commented

inventoryKey, rightHandKey and helmetKey don't support None value (yet). The only way to unbound them is setting some unused character.

As for the slotHotkeyX there is a specific check for None so, this cannot throw an exception. But it seems the sample settings file and Wiki specify the values at the wrong location. The right one is KISConfig/Global (not KISConfig/EvaInventory). Try changing it, it should work.

Btw, what's so critical in hotkeys being triggered while typing in a text box? It's incontinent and should be fixed if possible, I agree.

commented

Well, try this:
1 - Have a kerbal on EVA with a few items in inventory.
2 - Place a flag.
3- Enter some text to describe who landed and where. Example:
"Mun Landing Site #3
Debsan Kerman was Here: 2016-06-12"
4- Good luck not activating or accidentally putting on the ground and destroying anything!

Not to mention, KIS is not the only mod that do not block input when in a text box. Potential for mayhem is there I am telling you...

commented

Numbers will (un)equip items in inventory. With stock KIS items no destruction or dropping can happen since equip action never does anything on the real scene objects. The final state of equipped items will be random and this is, of course, an inconvenience.

Some letters in the text may trigger KIS actions like ""j", x", "h", "g" and "y" but as long as you don't click mouse during the typing (which I assume you don't) I don't see how any changes to the scene objects can happen. The only action which actually triggers something on key down is "j" but it won't work in vacuum, and in the atmosphere no catastrophic consequences can happen.

That said, I was lucky with your example and hasn't destroyed or dropped anything during the test :)

As for the other mods it's out of my control. If they make troubles the bugs should be filed against that mods.

And just to clarify. I do agree it should be fixed (see #152). I'm just trying to figure out the priority. Unless there are real bad consequences on triggering the events during typing the priority is low.

commented

Well, like you said, this is not "top priority". By the way, I changed the KIS config file and moved inventory keys to the Global section: I managed to setup the hotkey to my liking, finally. I disabled 1 to 0 for quick inventory access and setup "helmet" and "right hand" to the bracket key. Thanks for your help!

commented

Good! I'm closing this bug then in favor of #152 which covers the actual fix (not responding to KIS shortcuts when in UI text field).