m-byte918 / MultiOgarII

A continued version of the original MultiOgar, an open source Ogar server implementation written with Node.js.
Apache License 2.0
128 stars 131 forks source link

How to add hotkeys? #1521

Closed buckatron closed 5 years ago

buckatron commented 5 years ago

Could someone just help me to understand where I can add hotkeys? I really can't figure out how.. and I know this is a client sided problem, but if anyone knows it would be greatly appreciated if someone could let me know...

Tombez commented 5 years ago

Which client are you wanting to add 'hotkeys' to?

Cabotrez commented 5 years ago

@Tombez Cigar2

Tombez commented 5 years ago

https://github.com/Cigar2/Cigar2/blob/d3fa09fe2e9bf6c216b899c989381698329b6890/web/assets/js/main_out.js#L1598 Put an if statement checking if key is equal to the key you want to do something when it's pressed. Inside the if statement, write code to do what you want to happen when that key is pressed.