rbreslow / speak

A full featured chatbox addon for Garry's Mod.
GNU Affero General Public License v3.0
4 stars 0 forks source link

Enter does not work in combination with holding shift or spamming another key #29

Open rbreslow opened 4 years ago

rbreslow commented 4 years ago

I tried a solution like this:

      // when holding shift, or spamming a repeating key, we still want enter to
      // send the chat message
      if (e.keyCode === 13) {
        inputForm.submit();
        e.preventDefault()
      }

Problem is after submitting the form I'd get this:

[HTML] asset://html/?:1: Uncaught ReferenceError: speakJS is not defined