Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Add lua method to release held key #2226

Closed MaslovKK closed 1 year ago

MaslovKK commented 1 year ago

For example: Player helds key, then clicks on button that releases key, and this key now has no effect until this key will be physically released and will be down again

robotboy655 commented 1 year ago

This is already possible with https://wiki.facepunch.com/gmod/CUserCmd:RemoveKey

MaslovKK commented 1 year ago

This is already possible with https://wiki.facepunch.com/gmod/CUserCmd:RemoveKey

key now has no effect until this key will be physically released and will be down again

robotboy655 commented 1 year ago

Yeah, you can code a simple set-reset latch. You would simply keep removing the key until the key is depressed.