TastaturEreignis.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #include "TastaturEreignis.h"
  2. using namespace Framework;
  3. bool Framework::_ret1TE( void *param, void *obj, TastaturEreignis te )
  4. {
  5. return 1;
  6. }
  7. bool Framework::_nurNummernTE(void* param, void* obj, TastaturEreignis te)
  8. {
  9. if (te.taste[0] >= '0' && te.taste[0] <= '9')
  10. return 1;
  11. if( te.virtualKey == T_Entf || te.virtualKey == T_BackSpace )
  12. return 1;
  13. if( te.virtualKey == T_Links || te.virtualKey == T_Rechts || te.virtualKey == T_Unten || te.virtualKey == T_Oben )
  14. return 1;
  15. return 0;
  16. }
  17. bool Framework::_nurHexTE( void *param, void *obj, TastaturEreignis te )
  18. {
  19. if( te.taste[0] >= '0' && te.taste[0] <= '9' )
  20. return 1;
  21. if( te.taste[0] >= 'A' && te.taste[0] <= 'F' )
  22. return 1;
  23. if( te.taste[0] >= 'a' && te.taste[0] <= 'f' )
  24. return 1;
  25. if( te.virtualKey == T_Entf || te.virtualKey == T_BackSpace )
  26. return 1;
  27. if( te.virtualKey == T_Links || te.virtualKey == T_Rechts || te.virtualKey == T_Unten || te.virtualKey == T_Oben )
  28. return 1;
  29. return 0;
  30. }