a guest May 21st, 2017 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. **What is this?**
  3. The github project [D2SpaceModifier]( that "unlocks" the WINDOWS modifier key in DotA 2 and then binds it to the spacebar. This gives you 2 modifiers for keyboard layouts: Alt and Space. Some of you will recall Loopuleasa's work which was broken by Valve's limits to the autoexec in the spring of 2016. This project is a fork from the former and restores most of its functionality by utilizing four lines of AHK code:
  5.     #SingleInstance force
  6.     #IfWinActive ahk_exe dota2.exe
  7.     ~*Space::ControlSend, , {LWin Down}, Dota 2
  8.     *Space Up::Send {LWin Up}
  10. **Simply put, this code hides all down key presses of the left windows key from the operating system and ALL applications EXCEPT dota2.exe.** It is only active when "Dota 2" is the active window and Spacebar retains full functionality. Believe it or not, this is all we need to make the Spacebar into a modifier just like Alt. This is because Valve already had the windows keys setup to work as modifiers. The only reason we can't use them is because of windows shortcuts "Alt-tabbing" us out of DotA.
  12. **How to set it up?**
  13. **To Install:**
  14. *Only Supported on Windows Operating Systems*
  16. 1. Place D2SpaceModifier.exe in your StartUp folder, "%APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup". You can use the .ahk in the source code folder instead if you have AutoHotKey installed.
  18. 2. Place the autoexec.cfg inside of "Steam\steamapps\common\dota 2 beta\game\dota\cfg" and overwrite if necessary.
  20. 3. Pick a cool layout from the numbered folders or create your own. I recommend number 1 (my personal layout).
  22. * [No Modifier](
  24. * [Space Pressed](
  26. * [Alt Pressed](
  28. 4. Place the "570" folder inside of "Steam\userdata\ [Your 9 digit Steam ID here] " and overwrite.
  30. 5. Restart your computer. D2SpaceModifier.exe will run in the background but will be inactive unless you have DotA 2 running and are "alt-tabbed" into it.
  32. 6. Launch DotA 2 and customize to your liking.
  33. Note: The SPACE modifier reads "WINDOWS" in-game.
  34. Behold the SPACE modifier in action! [link](
  36. **How to uninstall?**
  38. 1. Just delete the files you pasted in the Game, 570, and StartUp folder.
  40. 2. Set your keybinds back to the way you want them.
  42. 3. Enable double-tap for self-cast in the DotA 2 options by raising the timeout to something around 0.5.
  43. Note: Double tap selfcast is intentionally disabled to prevent miscasts
  45. **Known Valve Bugs:**
  46. Self-cast abilities which are auto-castable are self-casted when the auto-cast hotkey is pressed. Only affects Ogre Magi, Lich, and neutral troll priest. This is a Valve bug and out of my control.
  48. **Frequently Asked Questions**
  49. **Why can't I double-tap to self-cast or change wards with double-tap?**
  50. That is intended behaviour in my super compact layout, to prevent miscasts. Alt+Key should do self-cast or switch wards. Furthermore, double tap self cast is impossible if you are using quick casts.
  51. This was done by reducing the self cast timeout tolerance to 0. The way "double-taping" works is by using the "smart-double tap" in-game option (hold space and press an item or ability's hotkey).
  53. **Can I rebind stuff in-game?**
  54. You can change the binds of almost everything using the default in-game UI.
  56. **Why do some of my commands not trigger?**
  57. That must be because of your non-standard keyboard. You should consider changing your keyboard layout to standard English in Windows options.
  59. **Does CAPSLOCK still do what it usually does, even if it's a keybind?**
  60. Yes.
  62. **How do I pick a modifier other than space?**
  63. You will need AHK installed ( Edit D2SpaceModifier.ahk in the "Source Code" folder by replacing the word "Space" on lines 3 and 4 with what ever key you want such as "x" for example. Here is a list of some AHK keys with unique names if you wish to bind to one of those ( Place your edited script in your StartUp folder instead of the exe (or compile a new exe yourself). Restart your computer and finish installation and tweaking as usual.
  65. **Will this get me banned?**
  66. Remember, all the script does is allow dota2.exe to see the windows key press while blocking it from the OS and every other application (only active while "Dota 2" is the active window). I haven't been banned and have played 1000+ games.
  68. **Can't you just disable the windows key using registry edits?**
  69. dota2.exe won't be able to see the key press then.
  71. **Made a cool keyboard layout and want to share it?**
  72. Contact me and I might add it to the main repository for people to see, and I'll give you credit. If you know how to use git, just fork the repo and request a merge using a pull request.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand