Galacticraft: No keybindings set, "Calculator" key opens Galactic Map

Created on 1 May 2018  Â·  18Comments  Â·  Source: micdoodle8/Galacticraft

Minecraft version: 1.12.2
Galacticraft version: 1.12.2-4.0.1-170

currently in SMP, server but I will test on single player

Galacticraft add-ons and other mods installed? Core, Planets and Tweaker 1.0.1, SevTech:Ages 3.0.6 pack

Suggestion - I would like a button on the star map to exit said star map please.

This is my dilemma, I usually turn off all keybinds of mods I am not currently using so Galacticraft has no active keybinds. I play with an older Microsoft keyboard with an easy access to calculator button. Keyboard layout is French Canadian.

When I press the calculator button with minecraft open, it opens up galacticraft star map on the game as well as my calculator ^_^ :D.
Buuuut since I don't have a keybind set to the starmap, I can't press anything to get out of it. Repressing the same calculator button does not close the star map, neither does pressing escape so I'm effectively stuck in the starmap till I relaunch the game >_<.

:D Took me a good while to identify the key I'd inadvertently pressed to open that I tell ya lols. I'm really curious to know what combination of code triggers that calculator button activates to access your star map O_O.

Looking forward to exploring your mod :). Thanks tons for your time.

edit - yup, same happens in single player, pressing that calculator button opens up both the star map in minecraft and the calculator app of my computer ^_^
Thanks again.

update - back on server and I set a keybind (p) to my galacticraft Galaxy Map (using correct term now that I've actually payed attention, sorry o_o) and when I now press my calculator key on my keyboard, only the calculator pops up, thought that information could be useful to figure out what actually happens

fixed

Most helpful comment

Sorry, when a keybind is unbound you just use the default? That is a bug by any means, GC should not be taking up a key if the keybind is specifically unbound...

All 18 comments

Seems like you've fixed it by setting a key binding.

I usually turn off all keybinds of mods I am not currently using so Galacticraft has no active keybinds.

You're on your own if you do that, sorry.


I think what you're saying here is that even with no keybind, the Galaxy Map opens when you press key 'M'. That's intended behaviour. If there is no keybind set, then a Galacticraft control will be set to its default key.

You can exit the map either by pressing the 'Esc' key (like any Minecraft GUI) or else by clicking on the red 'Exit' button in the top right corner.

Yeah, I am glad I found a work around but I'm still really curious as to why hitting a dedicated calculator key on my keyboard, gets me stuck in the Galaxy map if I have no keybind :/.
To be clear, I have all three Galacticraft keybinding choices set to NONE in my controls. THEN I hit my dedicated calculator key and it opens the Galaxy map and the ESC key does not toggle me out of it. No key on my keyboard toggles me out of it. I need to close minecraft and relaunch it :/.

I understand if you think it's such an outlying case that you don't want to take the effort to code an exit Galacticraft function on any of your UIs. :)

I don't get stuck if I press M, I press an extra dedicated key on my keyboard that opens up my calculator. O_o and the only reason I reported it is because pressing the ESC key does not close my Galaxy Map when I get stuck.

What I subsequently noticed is that pressing the dedicated Calculator key (WITH a keybind for the Galaxy Map set) pauses my game and also opens up... the Space Race Manager pop up in the bottom right of my UI, as well as... an Report Bug tab to report issues directly to SevTech: Ages pack and thirdly a What's New from WAILA tab on the right sides of my minecraft game screen.

Thanks for the quick reply ^_^ and I hope I was clearer in my explanation of what actually happens.

Sorry, when a keybind is unbound you just use the default? That is a bug by any means, GC should not be taking up a key if the keybind is specifically unbound...

okay, so subsequently, after talking with the guys on CoFH, I have a mayyybe supposition of that is happening?

it seems when I press my calculator key withOUT keybinds set on galacticraft it triggers the escape key in such a manner that it first accesses and opens up your galactic map?
then I can use the mouse to browse the planets and other buttons on that ui, but any subsequent presses of the ESC key does not close the map and I am stuck in the map screen in game with no way out but to close minecraft o_o

2018-05-02_03 21 51

A screenshot might help here. There should be a red "EXIT" button on the top right of that screen, which you can click. Do you have this?


it seems when I press my calculator key withOUT keybinds set on galacticraft it triggers the escape key in such a manner that it first accesses and opens up your galactic map?
then I can use the mouse to browse the planets and other buttons on that ui, but any subsequent presses of the ESC key does not close the map

This explanation is hard to believe. Unfortunately it's impossible for me to test as my keyboard does not have the 'calculator' key.

Maybe some of our regular players have a calculator key and can test this?

Hmm, Sevtech Ages also got Extra Planets, have you tried setting "Use Custom Galaxy Map/Celestaial Selection Screen" to false in the config?

Sorry, when a keybind is unbound you just use the default? That is a bug by any means, GC should not be taking up a key if the keybind is specifically unbound...

There is no bug. @tterrag1098 I don't think it's wise for you to assume there are bugs based on a quick comment in this thread, without actually testing it.

Galacticraft's behaviour in more detail is as follows:

  • On first start of a new Minecraft installation - more accurately, first run of Galacticraft in this Minecraft installation - Galacticraft takes its startup keybindings from the Galacticraft config files. If a config is missing or set to none there or has an invalid value, the Galacticraft default will be used, for example 'M' for Map.

  • That startup keybinding becomes the "default" for Minecraft's in-game controls system. For the Galacticraft keybindings, any time the player clicks 'Reset' in the in-game Controls menu, it will reset to the value specified in the Galacticraft config (or, as explained above, it will reset to the Galacticraft default if there is no good value in the config)

  • The keybinding can be changed to anything you want in Minecraft's in-game Controls menu, the same as for most other mods. You can choose the keybinding "None" if you want to unbind the key, so that works. Minecraft will remember these settings and saves all the keybindings (including mods keybindings) in options.txt.

This system allows players to customise their keys, and it also allows modpacks to provide a "recommended" set of keybindings by setting up Galacticraft config correctly (if the modpack compiler troubled to do that). Actually the keybindings set in the config file will only stick if the player didn't already play Galacticraft - if the player already played Galacticraft in this Minecraft installation then probably there are keybindings already set up in options.txt and those will override anything in the config. Some non-vanilla launchers might have a different system. There may also be mods which can save keybindings differently.


This Calculator key issue is a weird one. @KikiCur please can you post up a copy of your options.txt file?

It could be a bug in vanilla Minecraft when used with this specific keyboard, like the Calculator key matches the keybinding 0.

@KikiCur is it a Microsoft Sidewinder keyboard? Maybe with Intellitype software?

I don't know how this works, but maybe the Calculator key is a macro key - meaning, it simulates one or more other keypresses. I'm fairly sure there is no such thing as an actual "Calculator" key in a PC keyboard mapping.

org.lwjgl.input.Keyboard has nothing about a Calculator key, so however Microsoft does it, this key must look like something else to Java ...

What I subsequently noticed is that pressing the dedicated Calculator key (WITH a keybind for the Galaxy Map set) pauses my game and also opens up... the Space Race Manager pop up in the bottom right of my UI, as well as... an Report Bug tab to report issues directly to SevTech: Ages pack and thirdly a What's New from WAILA tab on the right sides of my minecraft game screen.

That suggests that the "Calculator" key is seen by Java as being the Esc key. The Esc key pauses the game. Tthose tabs you describe are probably standard for a paused game in this modpack.

There is no such thing as "dedicated calculator keys". The "10 key" keypad was/is an addition to the Standard keyboard (83 keys, the function keys (F1-F12), and the 10 key were added to make a 101 key "modern" keyboard). The 10 key keypad toggles to 2 different functions via the NumLock key. When the NumLock is on it's a standard 10 key (adding machine functions, yea that old) and the ACSII code/key scan sent is different. You can demonstrate this easily, open note pad or any "vanilla" text editor, turn numlock OFF, with your cursor in the text editor press the LEFT ALT key and on the 10 key type 225 then release the ALT key, a "ß" should appear on/in the text editor, now repeat with NumLock ON, you will get "♣". In windows "we" try/ed to take care of this by "looking" at what app you are in when you use it, so if you open your calculator we do try to read the input from the key pad as a 10 key, so it may appear that it's dedicated but its not, we just went with what we felt was "normal" expectation my most (not trying to be mean or cruel) computer illiterate people (about %99 of users).

@TheQuadShot I think some specific Microsoft keyboards from ~5 years ago (the OP says he has one) - names like Sidewinder X4 - have a dedicated Calculator button which opens the Windows Calculator, as well as a few other macro buttons. It's hard to find information about what exactly that dedicated Calculator button does. Possibly it just simulates a key sequence like Ctrl-Alt-C and then Ctrl-Alt-C is set up in Windows as a keyboard shortcut to open calc.exe.

calckey-1024x598

I'm getting you those pictures/screenshots now..., just relaunching the game since I went and did the keybind set to NONE picture first.

first is the Galaxy Map accessed with a normal keybind
https://www.dropbox.com/s/ukrr13g8q1gx438/Galaxy%20Map%20accessed%20with%20default%20keybind.jpg?dl=0

second is the Galaxy Map that pops up when I press my calculator key inside minecraft and I have all keybinds in Galacticraft set to NONE
I had to take a picture of this with my phone >_o
https://www.dropbox.com/s/utzi398azsejfj4/Galaxy%20Map%20accessed%20with%20Calculator%20key%20and%20keybind%20control%20set%20to%20NONE.JPG?dl=0

next a picture of my keyboard, what I call the dedicated calculator key is third from the right on the top, I have no clue what ELSE to call it o_o
https://www.dropbox.com/s/0bhlsmd51v15o5o/Keyboard%20with%20dedicated%20calculator%20key.jpg?dl=0
and the keyboard make/name
https://www.dropbox.com/s/vjtrp47qlejn4mr/Kiki%20Keyboard.jpg?dl=0

I appreciate you looking into this some more
and I apologise for the misunderstanding.
I DID think it was weirdly bad design for the Galaxy Map not to have an exit button on it, and I understand now why you were so perplexed I asked for something you already had.
Seems the calculator key is accessing your star map withOUT accessing the exit button O_o?

here is my options.txt file
https://www.dropbox.com/s/8p73e0lzpmqz08i/options.txt?dl=0

@radfast Right, what they are seeing is a function of the keyboard, the keyboard is sending the ascii, which is grabbed by windows and hence java and the keyboard driver is seeing the "launch the calc" function of the keyboard/macro. @KikiCur There should be a configuration for your keyboard and a way to disable that functionality so it behaves more like a "vanilla" keyboard. Some drivers will let you set these based on the program your running others can be a switch on the bottom of the keyboard.

I also have a calculator button on my keyboard and have never had issues inside MC. I often use it to quickly calculate crafting requirements etc.

@tterrag1098 I'm not disputing that, I'm sure lots of people do it and that's kind of my point. I would venture to say this is a "thing" with the keyboard driver not dealing with the French-Canadian keyboard properly, ie it's not reading/handling the extended ascii correctly. Otherwise this would be a much larger issue (lots of people with it) and it just isn't the case. I am of course only addressing part of the problem and imo it's the part that can't be dealt with here. The user could try a keylogger to see exactly what windows "sees" when they hit that key/s that may shed some light. They might also check to see and ensure that they are running the latest drivers. Call it a hunch if you want, but with as much i18n and l10n work I've done this isn't that weird a problem, just my 2 caps worth and trying to get this issue solved via elimination of variables.

According to xmodmap, keycode 148 is the X11 symbol for the calculator key, the XF86 symbol is XF86Calculator. I don't have it on my keyboard.

There's no mapping for that calculator key in LWJGL like I said above. LWJGL is the basic gaming library for Java which Minecraft is based on. It includes key press handling.

I think what's actually happening here is:

  • the calculator key has no mapping in Java, but a key has been pressed, so LWJGL treats it like key "NONE" has been pressed (LWJGL Keyboard code 0)
  • Galacticraft and probably other mods as well are still checking for all their keypresses every tick. If a Galacticraft key is unbound (Keyboard code 0) then pressing the calculator key actually matches that (Keyboard code 0) so the mod's code "thinks" the unbound key has been pressed (easily fixable)
  • In Galacticraft's code, the Galaxy Map keybinding is the first one to be checked, so that's why the map opens
  • Probably a couple of other mods also think their (unbound) keys have been pressed, so that's why @KikiCur is seing multiple weirdness all at the same time

Still unexplained why you don't have the red EXIT button on the solar system map. Could be another mod is drawing something black in that corner of the screen (covering the EXIT button) but the button is still there, if you click with your mouse in the place where the button should be.

I have fixed the problem of "calculator key matching an unbound Galacticraft key" in our next version 176. This version should be available to download ~ Friday. Until then, please take care not to press the calculator key...

Thanks you guys, I very much appreciate that you took the time to look into this

(Just for completion sakes, I went and checked if the exit key is actually clickable in the problem galaxy map and nope, it does not respond to a mouse press when I click in the top right corner screen (tried multiple times, in an area).)

Thanks again.

You're welcome. When 176 is released, try that, I think keys will work properly (or any remaining issues are outside our mod). If the "EXIT" button is still missing in the map, that maybe a totally separate issue. In that case, please open it as a new issue. Please test whether the same issue is seen without Extra Planets installed.

Was this page helpful?
0 / 5 - 0 ratings