Is There a Way to Change The State or Values of an Input?

I'm trying to make a game of mine controller compatible, but I have written too much code to change without risking breaking something. Is there a way to change control values? maybe like mouse[x] = something or mouse[left] = 1?