12.03.2019, 23:25
i want so when i hold CTRL (KEY_ACTION) and then press SPACE (KEY_HANDBRAKE) at the same time to call the function
but it only works in a reversed way, it works when i hold SPACE and then Press CTRL
So what i want is, call the function by holding KEY_ACTION (default left CTRL key) and pressing KEY_HANDBRAKE
(default spacebar) at the same time.
here is the code
but it only works in a reversed way, it works when i hold SPACE and then Press CTRL
So what i want is, call the function by holding KEY_ACTION (default left CTRL key) and pressing KEY_HANDBRAKE
(default spacebar) at the same time.
here is the code
Код:
if((newkeys & (KEY_ACTION | KEY_HANDBRAKE)) == (KEY_ACTION | KEY_HANDBRAKE) && (oldkeys & (KEY_ACTION | KEY_HANDBRAKE)) != (KEY_ACTION | KEY_HANDBRAKE)) { // MY FUNCITON WILL BE HERE }