mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Replace ukbhit by kbd_enter_pressed, not requiring tcgetattr:
Note that it behaves differently now * it looks for Enter key only, not any key * it "eats" the input, no need for (void)getchar() after it * it works the same no matter the value of ICANON * the mingw version has been adapted to act the similarly This should fix its usage on Android where tcgetattr always returns -1
This commit is contained in:
parent
fd5c30f555
commit
844d732297
27 changed files with 90 additions and 126 deletions
|
@ -375,9 +375,7 @@ static int CmdHF14ACUIDs(const char *Cmd) {
|
|||
// repeat n times
|
||||
for (int i = 0; i < n; i++) {
|
||||
|
||||
if (ukbhit()) {
|
||||
int gc = getchar();
|
||||
(void)gc;
|
||||
if (kbd_enter_pressed()) {
|
||||
PrintAndLogEx(WARNING, "\n[!] aborted via keyboard!\n");
|
||||
break;
|
||||
}
|
||||
|
@ -489,7 +487,7 @@ int CmdHF14ASim(const char *Cmd) {
|
|||
|
||||
PrintAndLogEx(SUCCESS, "press pm3-button to abort simulation");
|
||||
|
||||
while (!ukbhit()) {
|
||||
while (!kbd_enter_pressed()) {
|
||||
if (WaitForResponseTimeout(CMD_SIMULATE_MIFARE_CARD, &resp, 1500) == 0) continue;
|
||||
if (resp.status != PM3_SUCCESS) break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue