help with keyboard

General discussion for players of Oolite.

Moderators: another_commander, winston

soyoukan
Average
Average
Posts: 12
Joined: Sun Jan 19, 2020 5:20 pm

Re: help with keyboard

Post by soyoukan »

key_mode_equipment = "b";
key_fastactivate_equipment_a = "0";
key_fastactivate_equipment_b = "\t"; // tab

what do these keys do, in the game?
they dont appear to do anything when pressed.

Also, having a problem with the energy bomb key, which I changed to upper case Q, (TAB was assigned and didn't work anyway). The key doesn't do anything. I note that the comment says its primable, (upper-N, n?) but the bomb doesn't list.

I wanted to put the laser to SPACE (char 32?) but it doesn't change from a.


Thanks IA
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: help with keyboard

Post by dybal »

another_commander wrote: Wed May 15, 2019 10:40 am
merchant marine wrote: Wed May 15, 2019 1:17 am
this code tweak doesn't work.
I checked it earlier and it it does work. Make sure there were no other accidental edits in .GNUstepDefaults. That particular file is quite sensitive to editing and if a syntax error gets in it, then Oolite will delete it and create it afresh upon launch. In such case, yes, it would appear that it did not work.
In my machine (Linux) it's a XML file, and it was overwritten (not added to or merged) by the joystick configuration code in oolite - I had some settings there that I lost after installing the joystick, and my tries to add them back together with the joystick code weren't sucsessfull...
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6557
Joined: Wed Feb 28, 2007 7:54 am

Re: help with keyboard

Post by another_commander »

Those keys refer to primable equipment only. The core game does not feature primable equipment, so you will need to install OXP stuff to see them functioning.

Selected primable OXP equipment can be allocated to two special reserved slots: one for offensive and one for defensive devices. The fast activate _a and _b keys will immediately activate the equipment that is installed in these slots, without having to go through the process of cycling through the primable equipment list until the wanted item can be found, then pressing the key to activate it. It saves time for equipment that could be used frequently or required at a moment's notice (like the energy bomb, see below).

Primable equipment can also have different modes of functionality. One such equipment could be programmed to do more than one things by the OXP creator. key_mode_equipment is used to cycle through various functionality modes, if and when those exist for a piece of equipment

So don't expect those keys to do something until you install OXP equipment that makes use of them. Regarding the energy bomb, this does not exist in the core game for quite a few years now and can be installed only as primable equipment. The keyconfig file is mapping the bomb to the tab key, which is where it was before its removal and is also assinged as the default offesnive slot activation key. Rather than having to prime the bomb and activate it, the assignment on the tab key allows you to just press it and set it off. No matter which key you select, it will not do anything if you do not install the energy bomb OXP.

Finally, this line in keyconfig.plist will set space to fire the laser:

Code: Select all

key_fire_lasers				= " "; // just a space between the quotes
The fact that you tried to change it and it did not work probably means that you made a mis-edit in keyconfig somewhere, so the game failed to read it as a valid configuration file and switched to its built-in key configuration, which has "a" as the laser fire key. Check your Latest.log for possible errors while reading keyconfig.plist.

@dybal: I think you are referring to .GNUstepDefaults, but soyoukan is talking about keyconfig.plist.
dybal
---- E L I T E ----
---- E L I T E ----
Posts: 499
Joined: Mon Feb 10, 2020 12:47 pm

Re: help with keyboard

Post by dybal »

another_commander wrote: Mon Mar 30, 2020 3:18 pm
@dybal: I think you are referring to .GNUstepDefaults, but soyoukan is talking about keyconfig.plist.
So he is now, but at the start the topic was talking about properties in .GNUstepDefaults
soyoukan
Average
Average
Posts: 12
Joined: Sun Jan 19, 2020 5:20 pm

Re: help with keyboard

Post by soyoukan »

another_commander wrote: Mon Mar 30, 2020 3:18 pm
Finally, this line in keyconfig.plist will set space to fire the laser:

Code: Select all

key_fire_lasers				= " "; // just a space between the quotes
The fact that you tried to change it and it did not work probably means that you made a mis-edit in keyconfig somewhere, so the game failed to read it as a valid configuration file and switched to its built-in key configuration, which has "a" as the laser fire key. Check your Latest.log for possible errors while reading keyconfig.plist.
The log file was an interesting read, however nothing of importance mentioned except:

17:21:35.673 [WARNING]: Warning! Global namespace polluted by:
17:21:35.673 [WARNING]: ["mcat","i","j","key"]

Dont know why or how to fix

I have recreated the file, using the config app supplied (somewhere) officially and a text editor ATOM to put the file in the folder. No matter what i do, changes are ignored. I'm missing somethng?

I have the energy bomb already installed and also purchased/listed as items. It doesn't appear in primable list upper-N key.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4655
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: help with keyboard

Post by phkb »

soyoukan wrote: Mon Mar 30, 2020 4:33 pm
17:21:35.673 [WARNING]: Warning! Global namespace polluted by:
17:21:35.673 [WARNING]: ["mcat","i","j","key"]
These aren't related to keyboard settings at all. They're a notification, generated by the "Library" OXP I believe, to OXP authors that they have defined variables in the global namespace, which makes them potential conflict risks. You can ignore them for the purpose of this discussion.
soyoukan
Average
Average
Posts: 12
Joined: Sun Jan 19, 2020 5:20 pm

Re: help with keyboard

Post by soyoukan »

FIXED THE PROBLEM:

1) there is a keyconf file in ADDONS, i found by accident while deleting the energybomb files.

2) amended the file and whoah! it works

3) energybomb now works too
Post Reply