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:
@@ -186,7 +186,7 @@ local function main(args)
|
||||
for cardnum = baseid, endid do
|
||||
local card = cardHex(cardnum, facility)
|
||||
print('Press enter to program card '..cardnum..':'..facility..' (hex: '..card..')')
|
||||
--This would be better with 'press any key', but we'll take what we can get.
|
||||
--This would be better with 'press Enter', but we'll take what we can get.
|
||||
io.read()
|
||||
core.console( ('lf hid clone %s'):format(card) )
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user