mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -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
|
@ -70,7 +70,7 @@ end
|
|||
-- @return if successfull: an table containing card info
|
||||
-- @return if unsuccessfull : nil, error
|
||||
local function wait_for_mifare()
|
||||
while not core.ukbhit() do
|
||||
while not core.kbd_enter_pressed() do
|
||||
res, err = lib14a.read()
|
||||
if res then return res end
|
||||
-- err means that there was no response from card
|
||||
|
@ -161,7 +161,7 @@ local function main(args)
|
|||
|
||||
while not _exit do
|
||||
if print_message then
|
||||
print('Waiting for card or press any key to stop')
|
||||
print('Waiting for card or press Enter to stop')
|
||||
print_message = false
|
||||
end
|
||||
res, err = wait_for_mifare()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue