r/TagPro•
AllWillBe0K

[Userscript] Remap Your Keys!

After attempting to play Tagpro in the library on my laptop keyboard this afternoon (and growing increasingly frustrated with the laptop arrow keys), I decided that enough was enough, and threw together this quick little script that lets you configure and remap your keys.

#Features#

  • Allows you to remap your directional keys
  • Remap the buttons for Team/Group/All chat
  • Remap the button that displays Team Stats

To get started, install the script using TamperMonkey (or some other Userscript manager), and then configure the appropriate sections.

#Key Notes#

  • Configure the script when installing by editing the values in the "Movement Configuration" section. Just look up the key at the top of the script, and type the name after the " = " sign. Example: You want to use yghj, so you would change it to

      var direction_up_key = y;
      var direction_left_key = g;
      var direction_down_key = h;
      var direction_right_key = j;
    
  • The current setting is to override the default keys, so don't be alarmed if your normal wasd/arrow key setup doesn't work. If you'd like to keep the wasd/arrow key setup AND use your custom key mappings, just change the line var override_default_keys = true; to var override_default_keys = false;

  • The buttons in the Misc category are always overridden, regardless of the boolean value specified in override_default_keys

  • If a key is missing in the list, its either because I forgot to include it, or in the case of F5, it's designed to reload the game.

  • I've only tested this on my laptop for a few rounds, but it seems to run fine.

Here's the Remap Your Keys! script.

If there's any bugs (or feature requests!), let me know in the comments below, and I'll do my best to accommodate them.

#ijklmasterrace

#Changelog# 2015/01/13: Updated script to work on all Maptest servers.

Posted Nov 24, 2014, 12:49 AM UTC · edited

1726
velveteenrabbat•

yghj master race

13
psychfan5Anne Frank // Angry Ball #6(million)•

inb4 "yghj master race"

12
co1010Atheist 》Radius•

pls. =[]\ is where it's at.

3
quassusȼԻѳšƙƴ | Tears | Top 10, USC and stuff•

b-alt-space-alt master race

9
TagProR3KT<:[ R3KT ]:> || Centra || ( ͡° ͜ ͡°) ♛♚♜ЯƸƘŦ♜♚♛™ ( ͡° ͜ ͡°)•

what kind of hands do you have

2
quassusȼԻѳšƙƴ | Tears | Top 10, USC and stuff•

nimble fingers

2
WildMan7856The_Gary // Pi •

psh shift-ctrl-Fn-WindowsKey master race

1
Glass_MarbleGlass Marble | Centra•

I for one will be using ctrl, alt, delete and f4.

#ctrlaltdeletef4masterrace

9
tbpimasterPIMASTER•

I will be using c t r l master race

1
Bowtie-TagProbowtie- Almost sole member of the Leaving Committee•

Can I remap them to a controller?

4
syzlackIbis - Rollin Golden Boulders - Region War/World War IV Champion•

You can do that with other programs.

4
bugketBug // Diameter // B1 Productions•

An example of which is JoyToKey

1
AllWillBe0KOP0K•

There's this really cool new Gamepad API in HTML5, which allows browsers to natively access any gamepads connected. (Plug in an XBox controller and visit the website! It's pretty neat!) But from what I understand, the spec still hasn't been standardized, so at the moment, browser-support is limited to Chrome and Firefox.

It'd certainly be fun to learn and play around with the Gamepad API when I get the free time, and perhaps I'll look into doing something with it once the Pixi.js update comes along, if the devs haven't implemented it by then. Hopefully by then, browser vendors will have standardized the spec.

Ninja Edit: Unfortunately, my script currently does not support mapping to a controller, but check out the suggestions posted by the others!

1
scottocsScott•

No more caps lock! No more Command+w. Yiss.

2
WildMan7856The_Gary // Pi •

#HomeEndPgUpPgDn master race

1
SlyTradesmanSlyTradesman•

huh, for me it would be HomeDeleteEndPgDn master race

2
WildMan7856The_Gary // Pi •

Psh HomeDeleteEndPgDn scrub

1
mocl4bill•

I love you.

1
MoJoSto•

Your script has been added to the Modding Wiki. If you update or modify your script, reply to this message to let me know and I'll update the wiki.

1
AllWillBe0KOP0K•

I've updated the script to work on all of Maptest servers (I didn't know that there were more than 1 until today). No changes to functionality were made, but if you frequently play on other Maptest servers, feel free to grab the new version.

1
MoJoSto•

did you update the raw or did you create a new submission on github? if its the old file just updated, everything on the wiki should still be good.

1
AllWillBe0KOP0K•

I hit edit, and made a new submission, which showed up as a revision to my Gist. From what I can see, part of the direct url to the raw (looks like some hash?) definitely changed.

Wiki Link gist.github.com/karlding/60110f399868af7ecb75/raw/536b53f1cd2dbd92785523df8af3847037c97d5b/keys-remap.user.js

New Link gist.github.com/karlding/60110f399868af7ecb75/raw/476d72257cbbe9a5e77460e50945b2d34633e29e/keys-remap.user.js

1
[deleted]•

[deleted]

1
CallMeLargeFatherEggo || Centra•

I downloaded a couple days ago and it was working fine until today

I'm guessing it has something to do with the update?

1
AllWillBe0KOP0K•

Hmm, that's weird, it seems to be working fine for me. Can you try disabling your Userscripts one by one and see if that changes anything?

If you're using Tampermonkey on Google Chrome:

  1. Type chrome://extensions In the address bar
  2. Scroll down to Tampermonkey, and click "Options". This opens the Tampermonkey extension in a new tab
  3. Click on the tab saying "Installed Userscripts"
  4. Tick the checkbox beside each script, and in the dropdown that appears at the top, select "Disable". Hit Start to save.
  5. Repeat as necessary.

Shoot me a PM if it still doesn't work after all this, and I'll do my best to help you figure out what's wrong!

2
CallMeLargeFatherEggo || Centra•

Disabled and turned them back on, worked perfectly again. Thanks! This is a great script.

Weird that it turned off randomly after a few days

Looks like I am once again part of the #ijklmasterrace

1
AllWillBe0KOP0K•

We're glad to have you back with us!

2
[deleted]•

[deleted]

1