Updated Waitkey (Both, function and command)