Bonsai Posted November 21, 2014 Share Posted November 21, 2014 Hey Peeps, I have a little problem with unbinding a single function from a Key. Whenever I use the unbind function, any function bound to that key is getting unbound. According to the wiki it should be possible as long as you specify a function and a keystate. But for me it doesn't. Anyone else noticed that problem? Bonsai Link to comment
Bonsai Posted November 22, 2014 Author Share Posted November 22, 2014 C'mon People, Its either working or not.. Link to comment
novo Posted November 22, 2014 Share Posted November 22, 2014 We would be able to help you deeply if you post the code you're trying to execute. Either way, I've only noticed issues whilst trying to remove keys bound with built-in commands, such as 'chatbox'. Link to comment
Bonsai Posted November 22, 2014 Author Share Posted November 22, 2014 Alright, I think I just discovered the problem. It seems like, if the function you are trying to unbind is currently not bound to that key, it simply unbinds everything. I wasn't aware of that. Now I'm going with: if getKeyBoundToFunction(func) then unbindKey("F3", "down", func) end For some reason the isKeyBound function is serverside only. Bonsai Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now