rndbit
Member
|
invalid Kb.f() return value
This function returns odd values if no function key is pressed. Say i press KB_X key, then Kb.f() would return value 88, which is none of function keys. Shouldn't it return 0 in that case?
|
|
02-20-2011 04:41 PM |
|
Esenthel
Administrator
|
RE: invalid Kb.f() return value
Kb.f returns not KB_ but KF_
|
|
02-20-2011 05:08 PM |
|
rndbit
Member
|
RE: invalid Kb.f() return value
yes, i know, and returned value is invalid. at the moment i test validity of returned value like this:
Code:
KB_FUNC kpFunc = Kb.f();
if(!Kb.funcName(kpFunc))
kpFunc = NO_FUNC;
This is not the fastest way to do things i assume, so it would be nice that Kb.f() returned 0 in place of some odd not entirely random, but certainly invalid value
|
|
02-20-2011 05:38 PM |
|
Esenthel
Administrator
|
RE: invalid Kb.f() return value
for pressing 'x' Kb.f may return 'x' or 'X'
|
|
02-20-2011 05:42 PM |
|
rndbit
Member
|
RE: invalid Kb.f() return value
hmm i see. no docs describle this behavior. now it makes sense
|
|
02-20-2011 05:48 PM |
|
Esenthel
Administrator
|
RE: invalid Kb.f() return value
yes, there should be KF_X and similar KF for all other char keys, but I never added this
|
|
02-20-2011 06:56 PM |
|
rndbit
Member
|
RE: invalid Kb.f() return value
what is the difference between KB and KF then? They look same to me.
|
|
02-21-2011 09:35 AM |
|
Esenthel
Administrator
|
RE: invalid Kb.f() return value
kf will get called every few 0.x seconds sequentially when holding button
kb can be used to detect push, on state, release, double click only
|
|
02-21-2011 05:06 PM |
|