Yamazaki93 / TSWRDConnector

GNU General Public License v3.0
12 stars 0 forks source link

UK / GB Keyboard Layout #16

Closed ninjaz5736 closed 4 years ago

ninjaz5736 commented 4 years ago

I've made a GB keyboard layout file, implemented much like the FR one, adding

else if (keyboard == "en-GB")
            {
                KeyboardLayoutManager.Current = new GBDefaultKeyboardLayout();
            }

to TSWConnector.cs (under the if (keyboard == "fr-FR") statement), and adding the file TSW/GBDefaultKeyboardLayout.cs with the contents

namespace TSWMod.TSW
{
    class GBDefaultKeyboardLayout : USDefaultKeyboardLayout
    {
        public override InputHelpers.VKCodes[] AutomaticBrakeIncrease => new[] { InputHelpers.VKCodes.VK_OEM_3 };
        public override InputHelpers.VKCodes[] HandbrakeToggle => new[] { InputHelpers.VKCodes.VK_OEM_2 };

    }
}

I've also cloned your git and made a version that works with native Windows Joysticks (think flight simulator joysticks), if you're interested I could try and fork it / set up a pull request, I'm quite new to GitHub so initially just cloned the Repo.

Yamazaki93 commented 4 years ago

Hi, Thanks for helping out with this! The keyboard layout is definitely a plus so if you want to open a PR to merge this change I will be happy to. If you fork this repo, you can commit/push these keyboard changes and open a PR to merge it back to the develop branch. (or let me know if you would just like me to commit those changes myself if that's easier for you) As for the native windows joysticks, that sounds like a good idea too. For that, I would suggest we merge that separately in another branch so we have more chance to test it.

ninjaz5736 commented 4 years ago

Hi, Thanks for being so open! This is my first time really using GitHub to develop stuff, but I hope at least that simple pull works! I've now got a fork and have created a new branch within that, here. The README is kinda updated, but only as far down as the instructions, and I've now also got the RSN Cab Car to work (by copying the DB 766 config etc). It's a bit of a mess, but I'm sure you can kinda work out what I've done (I've essentially nuked/hijacked a load of the original code and visual studio has "cleaned up" the code removing a load of "using" statements, but I'm happy to try and rework it to fit better into the original application if needs be!) I don't know if you want to try and pull / merge (I don't know all the terminology, I'm trying to learn it as fast as possible!) that branch into your repo, but I'm happy with whatever!

Also I'm happy to start a new issue if you see fit, seeing as this isn't really so related to the original topic any more!

Yamazaki93 commented 4 years ago

Thanks for the PR, it's now merged and this will be included in the next release.