Add Key Event Code Functions