#define PRESSED(%0) (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(PRESSED(KEY_LOOK_BEHIND)) { // execute command } return 1; }