Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: TwoCables on September 20, 2015, 08:53:52 am

Title: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 20, 2015, 08:53:52 am
Thanks to what Solatar just posted in this thread (http://www.hard-light.net/forums/index.php?topic=90490.msg1795896#msg1795896), I have rewritten this entire original post and this thread's title.

So basically, in both 3.7.2 RC5 and Final, pressing Volume Up or Down on my keyboard will trigger the hotkeys for opening the Tech Room Database and the Campaign Room, respectively. My keyboard is just a standard 104-key keyboard - it doesn't have any multimedia keys on it. So, I gave it some media keys by using SharpKeys (http://sharpkeys.codeplex.com/) to remap Keypad Plus and Keypad Minus to Volume Up and Down. I remapped some other keys too, but they aren't tripping any hotkeys.

So yeah, when I press Keypad Minus at the Main Hall (which I have remapped to be Volume Down), the Campaign Room opens up. When I press Keypad Plus (Volume Up), the Tech Room Database is opened.

This has been happening since 3.7.2 RC5 and it never happened in any other version that I can recall. I mean, the first time that I saw it happen, it really threw me off because I ALWAYS waited to adjust my volume at the Main Hall after the Pilot Selection (upon starting the game up) because that's what made enough noise for me to judge it.

How to reproduce it: all you need are keys on your keyboard that change the volume. How you achieve that is completely up to you. I used SharpKeys. You can use whatever you want. Solatar has a laptop with built-in media keys. I don't, yet we both have this bug. So, it's not on my end; the culprit is 3.7.2 RC5 and 3.7.2 Final.
Title: Re: 3.7.2 RC5 and Final Main Hall keyboard shortcuts (complaint)
Post by: AdmiralRalwood on September 20, 2015, 02:11:37 pm
I have a complaint, but I would bet that I'm the only one who can complain about this. Let's find out.

In 3.7.2. RC5 and 3.7.2. Final, there are two new keyboard shortcuts that I noticed: Keypad Minus goes to the Campaign Room, and Keypad Plus goes to the Tech Room Database. I don't like this because I have these two keys mapped for Volume Down and Up, respectively. In 3.7.2. RC4 and all earlier versions, Keypad Minus and Plus don't do anything, meaning that I can freely adjust my volume all I want in the Main Hall. Is there any way that I can customize these keyboard shortcuts in 3.7.2. Final?
Uh... they shouldn't. The keyboard shortcut for the Campaign Room is "C" and for the tech room is "T", and I can't find anything relevant in the code that should cause KEY_PADMINUS or KEY_PADPLUS to be interpreted any differently. Additionally, if I fire up FSO and hit keypad minus or keypad plus, nothing happens.

So, uh... cannot reproduce?
Title: Re: 3.7.2 RC5 and Final Main Hall keyboard shortcuts (complaint)
Post by: TwoCables on September 20, 2015, 02:22:47 pm
I have a complaint, but I would bet that I'm the only one who can complain about this. Let's find out.

In 3.7.2. RC5 and 3.7.2. Final, there are two new keyboard shortcuts that I noticed: Keypad Minus goes to the Campaign Room, and Keypad Plus goes to the Tech Room Database. I don't like this because I have these two keys mapped for Volume Down and Up, respectively. In 3.7.2. RC4 and all earlier versions, Keypad Minus and Plus don't do anything, meaning that I can freely adjust my volume all I want in the Main Hall. Is there any way that I can customize these keyboard shortcuts in 3.7.2. Final?
Uh... they shouldn't. The keyboard shortcut for the Campaign Room is "C" and for the tech room is "T", and I can't find anything relevant in the code that should cause KEY_PADMINUS or KEY_PADPLUS to be interpreted any differently. Additionally, if I fire up FSO and hit keypad minus or keypad plus, nothing happens.

So, uh... cannot reproduce?

Hmm. It seems to me that the only way to reproduce it might be by using SharpKeys (http://sharpkeys.codeplex.com/) to remap the Keypad Minus and Plus keys to be Volume Down and Up.  I'm using Windows 7, but I don't know whether that matters.
Title: Re: 3.7.2 final Main Hall keyboard shortcuts (complaint)
Post by: Solatar on September 21, 2015, 07:15:17 pm
It happens to me when I play on an old XP laptop with that SCP version. The built in volume buttons trip the mainhall hotkeys. I have a MODed to hell install and windows XP, so I don't generally report strange bugs like that. Totally happened, though. You're not crazy. :)

Title: Re: 3.7.2 final Main Hall keyboard shortcuts (complaint)
Post by: TwoCables on September 21, 2015, 08:53:26 pm
It happens to me when I play on an old XP laptop with that SCP version. The built in volume buttons trip the mainhall hotkeys. I have a MODed to hell install and windows XP, so I don't generally report strange bugs like that. Totally happened, though. You're not crazy. :)

Thank you! Now we might be able to get this fixed since now we have a clear way of describing it and maybe even a reliable way of reproducing it.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: Cyborg17 on September 22, 2015, 07:35:42 am
Weird bug......
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: jr2 on September 22, 2015, 09:27:32 am
What kind of programs do you have running to remap keys?  Is it only SharpKeys, or do you have JoyToKey, or other hotkey programs?

Take a look at what's starting up with your system with something like Autoruns, and see if there are other programs that maybe you forgot you had used for things like that.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 09:42:38 am
What kind of programs do you have running to remap keys?  Is it only SharpKeys, or do you have JoyToKey, or other hotkey programs?

Take a look at what's starting up with your system with something like Autoruns, and see if there are other programs that maybe you forgot you had used for things like that.

SharpKeys simply makes a change to the Registry and then you're done with it. So, when you use SharpKeys, you don't need anything running in the background in order to maintain your new key mappings because that's done by the Registry thanks to SharpKeys. You simply remap the keys, log out of Windows, log back in, and you're done. SharpKeys doesn't start with Windows, nor does it stay open in the background because the Registry maintains the key mappings.

So, I have absolutely nothing running in the background or starting with Windows for this. It's a bug with FSO 3.7.2. RC5 and Final.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: jr2 on September 22, 2015, 09:50:24 am
Couldn't be a bug in Sharpkeys mapping the wrong / additional keys, could it?  Or even Windows itself?  [/devil's advocate]
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 10:15:01 am
Couldn't be a bug in Sharpkeys mapping the wrong / additional keys, could it?  Or even Windows itself?  [/devil's advocate]

This only started happening in 3.7.2. RC5 and again in Final. All previous versions are unaffected. So, I don't see how SharpKeys or Windows itself can be the problem, especially since I have never had any problems after using SharpKeys to remap some of my keys a few years ago in order to get media keys.

This is just a bug that affects you if you have volume keys on your keyboard, just as Solatar found for himself.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 01:36:06 pm
Couldn't be a bug in Sharpkeys mapping the wrong / additional keys, could it?  Or even Windows itself?  [/devil's advocate]

This only started happening in 3.7.2. RC5 and again in Final. All previous versions are unaffected.
Are you sure about "all previous versions"? 3.7.2 RC4 didn't have main hall hotkeys for... uh... reasons, but before that, the hotkeys should have been identical (and therefore treated identically by snazzyui). Can somebody having this problem quickly test 3.7.2 RC3 and/or 3.7.0 to verify whether or not it happens with those versions?
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 02:01:53 pm
Couldn't be a bug in Sharpkeys mapping the wrong / additional keys, could it?  Or even Windows itself?  [/devil's advocate]

This only started happening in 3.7.2. RC5 and again in Final. All previous versions are unaffected.
Are you sure about "all previous versions"? 3.7.2 RC4 didn't have main hall hotkeys for... uh... reasons, but before that, the hotkeys should have been identical (and therefore treated identically by snazzyui). Can somebody having this problem quickly test 3.7.2 RC3 and/or 3.7.0 to verify whether or not it happens with those versions?

Yes, of course I'm sure. According to the filenames of the log files that I still have, I started with 3.7.0 SSE2 - and I was able to freely adjust the volume in the Main Hall without any problems. This is the very first time that I've ever encountered this.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 03:10:06 pm
Having a log file to guarantee that it didn't used to happen is not the same thing as firing up an old build to make sure it doesn't happen; something external to FSO (a Windows update, for example) could have changed the behavior.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 03:42:32 pm
Having a log file to guarantee that it didn't used to happen is not the same thing as firing up an old build to make sure it doesn't happen; something external to FSO (a Windows update, for example) could have changed the behavior.

l've had Windows Update disabled since July of 2012. I also literally haven't changed anything or updated anything: my computer is 100% the same as it was when I had 3.7.0. I'm telling you, this bug is new for me and it's not something that I'm doing that's causing it. It's 3.7.2 RC5 and 3.7.2 Final that's causing it.

I'm not using a log file to guarantee that it didn't used to happen and I'm not saying "see? That's proof". No. I merely wanted to see whatt the first version I used was. You see, I already know that 3.7.2. RC5 and 3.7.2. Final is when this began happening. I know that I didn't experience this before.

Did you try to reproduce this yet? I already explained how to reproduce it, pretty much. Try to reproduce it for me and then tell me what happened.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: chief1983 on September 22, 2015, 03:56:30 pm
He'd probably be more likely to install software that none of us have ever heard of before to help debug this if you were more willing to meet in the middle and double check with an older build one more time just to rule out any other possibilities.  It's not unheard of to ask a bug reported to double check behavior with previous builds just to be on the safe side.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: m!m on September 22, 2015, 04:01:52 pm
@TwoCables: Can you test the various nightlies between RC4 (http://www.hard-light.net/forums/index.php?topic=88132.0) and RC5 (http://www.hard-light.net/forums/index.php?topic=89566.0) to see which revision introduced the bug? If you use binary search you should be able to identify the offending revision in less than 9 steps.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 04:11:58 pm
What's binary search? How do I find the various nightlies between RC4 and RC5?

Just so you know, I am currently in the middle of a run through the campaign and I don't have any interest in screwing it up. I tried using 3.7.0 earlier today, and all I get is an error.

Look, it's very simple to see if you can reproduce it and it would be far easier for you guys to try it than for me to do anything that you've asked me to do (I'm honestly very surprised that no one has tried to reproduce it yet seeing as how easy it is). This is how to do it:

1. Download SharpKeys. http://sharpkeys.codeplex.com/downloads/get/319725 (it's a .zip file)
2. Extract it and open it.
3. Remap a couple of keys for Volume Up and Volume Down. If you need help with this, then I can help.
4. Click "Write to Registry"
5. Log out of Windows and log back in
6. Go to the Main Hall
7. Use your volume up and down keys

If the only thing that happens in the main hall is your volume changes, then ok. However, if you simultaneously get a change in volume with something else such as the Campaign Room opening up, then you just reproduced it.

Again, just in case it matters, I am using Windows 7 - and my copy hasn't changed since July of 2012 because that's when I disabled Windows Update (and it's still disabled today). I also haven't done anything else since then to change anything. The only thing that's different is this little bug.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 04:18:18 pm
@TwoCables: Can you test the various nightlies between RC4 (http://www.hard-light.net/forums/index.php?topic=88132.0) and RC5 (http://www.hard-light.net/forums/index.php?topic=89566.0) to see which revision introduced the bug? If you use binary search you should be able to identify the offending revision in less than 9 steps.
That won't work; RC4 doesn't have main hall hotkeys at all, so the bug would presumably be introduced as soon as those were added back in.

Just so you know, I am currently in the middle of a run through the campaign and I don't have any interest in screwing it up. I tried using 3.7.0 earlier today, and all I get is an error.
It's impossible to screw up your campaign save file if you never load that pilot; you can just create a new pilot to test with (also launch without mods selected to avoid 3.7.0 errors which are presumably related to the 2014 MediaVPs).

Look, it's very simple to see if you can reproduce it and it would be far easier for you guys to try it than for me to do anything that you've asked me to do
...Uh, you want us to install a program we've never heard of to modify our registries, and you think this is easier than you taking a minute to verify that the change in behavior is actually caused by FSO?

Given that you have Windows Update disabled, for all we know it's equally likely you have a virus from an out-of-date copy of Windows.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: mjn.mixael on September 22, 2015, 04:19:53 pm
Yeah, I wouldn't download some random app that's going to mess with my registry just to test your bug without absolute confirmation FSO is the cause. I especially can't be arsed if you can't be arsed to test a few older builds.

1. Download an older build from any of the clearly labeled locations on this board.
2. Run build, check for bug.
3. Repeat as necessary.

My list is shorter.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: chief1983 on September 22, 2015, 04:20:55 pm
'Binary search' just means divide and conquer, instead of testing every nightly in order start to finish, start in the middle.  If the middle revision doesn't exhibit the issue like RC4, then it was introduced after RC4.  So go halfway from the middle to the RC5 revision, and try again.  If it does, then it was introduced before the middle revision.  Go halfway back instead of forward, and repeat until the culprit commit is identified.

Backing up your data/players folder should be sufficient to ensure that nothing affects your campaign, but the likelihood of starting a build between RC4 and RC5 affecting your campaign should be incredibly minimal.

I can't personally help you out as I don't have a working Windows rig.  These other devs may not have one available at the moment either, as we are all volunteers and sometimes a bit too busy to actually sit down and do these things right at the moment.  So, you can wait for a dev that can do what you're asking, or help us help you by doing what we've asked.  Up to you.  We do want to help though, we're just suggesting ways that you, as a motivated bug reporter, might be able to help expedite the process.

Ninja'd:  Or like they said, RC4 won't have the hotkeys at all, so might have to modify this once it is determined for sure that it was broken in RC3 or whatever.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 04:39:58 pm
You guys are asking me to do something that, for me, would be much harder and much more time-consuming than for you to just map some of your keys to be Volume Up and Volume Down and then test them in the Main Hall. Really, you all could have done that by now and then you'd probably have reproduced this problem just like Solatar did for me. As he found, you don't even have to use SharpKeys if you are really that suspicious of it. I mean again, Solatar has the same problem with his laptop's built-in media keys for Volume Up and Volume Down. So obviously, THIS ISN'T CAUSED BY SHARPKEYS. Besides, SharpKeys simply does the same thing that some people do manually, but it does it all for you in a simple GUI.

All you need are keys on your keyboard that are set to be Volume Up or Volume Down. How you achieve it doesn't matter. So why was I asking you to use SharpKeys? Because of it's simplicity and because it doesn't have to be installed (that's why I used it).

So far, you guys seem very unwilling to truly help me. You want me to do everything while you just type up posts. Solatar actually went and did something to see if I'm not alone, and I appreciate it because he's experiencing the exact same thing - just in case anyone missed it (it's in my original post... here's the link to his post: http://www.hard-light.net/forums/index.php?topic=90490.msg1795896#msg1795896).

I thought that with a bug report like this, the standard procedure is, ask how to reproduce it and then go and reproduce it upon learning how. All you have to do here is just find some way to make 2 of your keys on your keyboard be Volume Up and Volume Down and then use them in the Main Hall. That should be all you need to do.

You guys need to understand that I'm not a programmer or a developer or anything like that. I just play the game. That's it. All I'm doing here is reporting a bug. Thanks to Solatar, I know that this isn't caused by SharpKeys and that all you really need are keys on your keyboard that change the volume. Beyond that, I'm clueless. I'm just a user here. I don't know what you guys know. You guys are asking too much of me here!
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 05:10:41 pm
Nobody said it was caused by SharpKeys. We just want confirmation that it's actually caused by FSO before we spend more time looking into it. Having somebody else experience the same problem does nothing to guarantee that FSO is actually the problem, and basically telling us that we're lazy when you're unwilling to provide basic confirmation of your own bug report does not incline us to spend our free time helping you further. If you are under the impression that nobody looked into this problem, that is simply not true: I looked at the code from RC5 and RC3 and as far as I can tell, snazzyui should behave identically in this regard. Having determined that, according to the code, there shouldn't be a behavior difference, the natural next step is that you confirm that there actually is a behavior difference. This should not take a great deal of time for you; downloading and running a a specific build of FSO shouldn't take more than a minute. Once armed with the confirmation that FSO actually is the problem, then I might consider spending time playing with my registry to try to reproduce the problem (and then, assuming it gets reproduced, figure out why it's happening). Otherwise, I do have other things I could be spending my time on than "maybe possibly reproduce a potential bug that may or may not actually be caused by FSO and affects very few people even if it is", even just counting FSO-related things, and having to deal with somebody who does not seem willing to perform basic troubleshooting steps is automatically going to rank it lower on my priorities.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 05:19:25 pm
Well again, I'm just a user. I just play the game. I'm not like you guys where this stuff is easy and takes just seconds. All I know is, you just need one key on your keyboard for Volume Up and one for Volume Down. You don't even have to mess with your Registry because there are programs out there that will create media keys for you without making any changes to your system at all (but they do need to stay open in order to maintain the key settings). With as good as you guys seem to be on your computers, I'd bet that this wouldn't take long at all to accomplish and would probably be a walk in the park. Asking me to do all this stuff though is overwhelming me. I'm sorry, but I'm just not at the same level as you guys are! I'm nowhere near it. I don't even know where to begin here. I'm like a damn deer in headlights reading all of your posts here - except maybe for Solatar's. heh

Call me stupid, but I don't see why you can't just find a program that does this, one that you trust. I trust SharpKeys because it was recommended by experts. You can use whatever you want though. All you need are media keys on your keyboard for volume control. Now, since I don't know any better, you might also need Windows 7. I don't know. That's what I have, so that's all I can go by.

Maybe you're not aware, but this thread was moved for me by a moderator because I originally posted it in the general support forum on here. I didn't know that it should go here instead. Does the fact that this thread is in this specific forum give you guys the impression that I'm a computer expert or something? Or that I'm a programmer? I mean, you almost need to be gentle and treat me like I'm damn-near computer-illiterate compared to you. Like I said, I'm not at the same high level as you guys are. I'm just a user.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: Axem on September 22, 2015, 05:42:16 pm
I can reproduce the issue and it goes back to far far far before RC3, I'm getting it in a build from 2008! Not sure if it was there since retail, I'll have to try it a bit later.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 05:48:21 pm
I can reproduce the issue and it goes back to far far far before RC3, I'm getting it in a build from 2008! Not sure if it was there since retail, I'll have to try it a bit later.

Thank you!

I'm honestly surprised to see this happening in a build that old. When this happened to me in 3.7.2 RC5, it really threw me off. It definitely wasn't the first time that I had adjusted my volume at the main hall like that. Like I said, that's where I usually adjust it. So I don't know what's going on. I haven't changed anything. My Windows Update history doesn't show anything new since July of 2012, so I don't know. I haven't changed anything else either, except for the FSO .exe that I'm launching using FS2 Open Launcher 5.5g.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 05:58:19 pm
If the behavior was not introduced with 3.7.2 RC5, that means that an FSO code change is not responsible, and (since my keyboard's volume spinner doesn't trigger the same behavior, when I'd imagine it also maps to Volume Up/Down) the behavior is likely (but not necessarily) caused by something external to FSO.

(Or it's an operating system difference, since I am running Windows 10. Still, I'm pretty sure I've probably changed my volume in the mainhall at some point while I was running Windows 7.)

TwoCables, it would really help if you could absolutely verify that your system and Axem's system are not behaving completely differently, and to know that, we need confirmation of whether or not you experience the problem in an older build. I don't want to overwhelm you with insistence that you perform beyond your technical literacy, so I'll try to break this down to a simple set of steps:

1) Download this build (http://swc.fs2downloads.com/builds/WIN/fs2_open_3.7.2_RC3.zip).
2) Extract it to your FSO folder.
3) Run fs2_open_3_7_2_RC3.exe (you shouldn't need to go through your launcher; odds are you aren't using any command-line options added since then).
4) If you're really, really worried about messing up your campaign savefile (you won't, but even if you're worried anyway), make a new pilot.
5) See what happens when you hit volume up/down in the mainhall, and report back here.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: Axem on September 22, 2015, 06:20:58 pm
I got it to happen with the steam version of FS1 as well. :p

Oh also, no special hotkey programs or registry edits. Just a Steelseries G6v2 keyboard.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 06:23:45 pm
It's happening in RC3 too.

Judging from my log file names, I went directly from 3.7.0 Final to 3.7.2 RC4 and then went to 3.7.2 RC5 and then to 3.7.2 Final. I could have sworn I used more versions than that. Either way, I don't remember it happening in 3.7.0 Final. I can't get it to work right now though. I just get this:

Code: [Select]
mv_effects-sdf.tbm(line 16):
Error: Required token = [#END] or [$Species_Name:], found [$Countermeasure Type: Type One] .

ntdll.dll! ZwWaitForSingleObject + 21 bytes
kernel32.dll! WaitForSingleObjectEx + 67 bytes
kernel32.dll! WaitForSingleObject + 18 bytes
fs2_open_3_7_0.exe! <no symbol>
fs2_open_3_7_0.exe! <no symbol>
fs2_open_3_7_0.exe! <no symbol>
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: mjn.mixael on September 22, 2015, 06:25:58 pm
MediaVPs is not compatible with 3.7.0. Just run 3.7.0 with no mods and it will work.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 06:34:35 pm
Still, the fact that it happens on RC3 is confirmation enough that your results should be no different than Axem's.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: Axem on September 22, 2015, 06:38:40 pm
My discovery is this so far:

Using this program (http://www.passmark.com/products/keytest.htm) I was able to see the keyboard scan codes when I press certain buttons. When I press Vol Down the BIOS key code is 0x2E. When I press C I also get 0x2E. The keycodes are also the same for Vol Up and C, and Play/Pause and G (other mainhall hotkeys!)

Sort of odd, but when you look at the scan codes in general (http://www.computer-engineering.org/ps2keyboard/scancodes2.html) for the multimedia keys, you see that they collide in the spec as well. (Vol down = E0, 21, C = 21)

Now I asked MageKing to do the same thing, install the program and report what he got. All of his media keys report a BIOS key code of 0x0. So... unintentional hardware level problem perhaps?
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 06:39:24 pm
Now it's doing it in 3.7.0. The only possible conclusion that I can come up with is, maybe I tolerated it back then - maybe I just put up with it. I used 3.7.2. RC4 *FAR* longer than I used 3.7.0, so I guess that's a possible explanation for why I'm like "whoa, what's this?"
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 22, 2015, 06:52:39 pm
If I copy C:\Games\FreeSpace2\data\players to a safe place, then would I be able to start completely fresh and then copy that back to where it was when I'm done so that I can continue where I left off?
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: Axem on September 22, 2015, 06:54:03 pm
And then using a different keyboard with media keys, the bios key code for those media keys is 0x0 and FreeSpace doesn't do anything weird with switching screens. So this looks like a case of different hardware implementations causing FreeSpace a little confusion.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 06:55:54 pm
If I copy C:\Games\FreeSpace2\data\players to a safe place, then would I be able to start completely fresh and then copy that back to where it was when I'm done so that I can continue where I left off?
You can just... make a new pilot.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: niffiwan on September 22, 2015, 06:59:02 pm
Sort of odd, but when you look at the scan codes in general (http://www.computer-engineering.org/ps2keyboard/scancodes2.html) for the multimedia keys, you see that they collide in the spec as well. (Vol down = E0, 21, C = 21)

According to that link the scancodes are different, the multimedia ones have an extra "E0", whatever that means. Maybe the test program & FSO are ignoring that "modifier"?
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: jr2 on September 22, 2015, 07:21:25 pm
If I copy C:\Games\FreeSpace2\data\players to a safe place, then would I be able to start completely fresh and then copy that back to where it was when I'm done so that I can continue where I left off?
You can just... make a new pilot.

Yes you could but as AdmiralRalwood said, not necessary; make a new pilot and your old campaign files won't be touched (they are stored in the pilot file).
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: AdmiralRalwood on September 22, 2015, 07:27:32 pm
Sort of odd, but when you look at the scan codes in general (http://www.computer-engineering.org/ps2keyboard/scancodes2.html) for the multimedia keys, you see that they collide in the spec as well. (Vol down = E0, 21, C = 21)

According to that link the scancodes are different, the multimedia ones have an extra "E0", whatever that means. Maybe the test program & FSO are ignoring that "modifier"?
FSO intentionally performs an "& 0xFF" masking on the key to strip out modifiers that get bitpacked in. The problem is that, assuming that "E0, 21" means that the actual keycode is 0xE021, we have a problem because it overlaps with KEY_DEBUGGED, KEY_CTRLED, and KEY_ALTED.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: niffiwan on September 22, 2015, 07:35:19 pm
what a pain... I wonder what antipodes does here :)
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: m!m on September 23, 2015, 09:24:57 am
what a pain... I wonder what antipodes does here :)
That may be worth a try.

@TwoCables: Please try an antipodes build (http://swc.fs2downloads.com/builds/WIN/Antipodes/fs2_open_Ant9_20150716_2777459_SSE2.7z) (you'll also need to unpack this zip (https://www.libsdl.org/release/SDL2-2.0.3-win32-x86.zip) to your FSO directory) to see if that changes your situation. Those builds use a new and (hopefully) better way of checking which keys were pressed which may solve this issue.
Title: Re: 3.7.2 RC5 and Final Main Hall hotkeys tripped by keyboard's volume buttons
Post by: TwoCables on September 23, 2015, 07:36:49 pm
what a pain... I wonder what antipodes does here :)
That may be worth a try.

@TwoCables: Please try an antipodes build (http://swc.fs2downloads.com/builds/WIN/Antipodes/fs2_open_Ant9_20150716_2777459_SSE2.7z) (you'll also need to unpack this zip (https://www.libsdl.org/release/SDL2-2.0.3-win32-x86.zip) to your FSO directory) to see if that changes your situation. Those builds use a new and (hopefully) better way of checking which keys were pressed which may solve this issue.

I will be able to try this in 6-8 hours from now. I think.

I was getting worried that people might be waiting for me to try this and reply with the results, seeing as how active I've been in this thread so far.


Edit: Nope, I'm too sleepy. I might be able to do it tomorrow, or maybe in a few days because my life's about to get busy for a couple of days.