SHARE
TWEET

Untitled

a guest May 21st, 2017 138 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. **What is this?**
  2.  
  3. The github project [D2SpaceModifier](https://github.com/Karrandalf/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:
  4.  
  5.     #SingleInstance force
  6.     #IfWinActive ahk_exe dota2.exe
  7.     ~*Space::ControlSend, , {LWin Down}, Dota 2
  8.     *Space Up::Send {LWin Up}
  9.  
  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.
  11.  
  12. **How to set it up?**
  13. **To Install:**
  14. *Only Supported on Windows Operating Systems*
  15.  
  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. https://autohotkey.com/
  17.  
  18. 2. Place the autoexec.cfg inside of "Steam\steamapps\common\dota 2 beta\game\dota\cfg" and overwrite if necessary.
  19.  
  20. 3. Pick a cool layout from the numbered folders or create your own. I recommend number 1 (my personal layout).
  21.  
  22. * [No Modifier](https://cloud.githubusercontent.com/assets/19603023/26277989/6f11ca28-3d57-11e7-8472-4e4ff262df8d.png)
  23.  
  24. * [Space Pressed](https://cloud.githubusercontent.com/assets/19603023/26277992/7bbc7a02-3d57-11e7-9e77-dd6ce634c991.png)
  25.  
  26. * [Alt Pressed](https://cloud.githubusercontent.com/assets/19603023/26277996/84c0ccf2-3d57-11e7-96bc-418a29a09293.png)
  27.  
  28. 4. Place the "570" folder inside of "Steam\userdata\ [Your 9 digit Steam ID here] " and overwrite.
  29.  
  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.
  31.  
  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](https://cloud.githubusercontent.com/assets/19603023/26280395/13386eb0-3d97-11e7-8611-253684316744.png)
  35.  
  36. **How to uninstall?**
  37.  
  38. 1. Just delete the files you pasted in the Game, 570, and StartUp folder.
  39.  
  40. 2. Set your keybinds back to the way you want them.
  41.  
  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
  44.  
  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.
  47.  
  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).
  52.  
  53. **Can I rebind stuff in-game?**
  54. You can change the binds of almost everything using the default in-game UI.
  55.  
  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.
  58.  
  59. **Does CAPSLOCK still do what it usually does, even if it's a keybind?**
  60. Yes.
  61.  
  62. **How do I pick a modifier other than space?**
  63. You will need AHK installed (https://autohotkey.com/). 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 (https://autohotkey.com/docs/KeyList.htm). 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.
  64.  
  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.
  67.  
  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.
  70.  
  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
 
Top