Home Contents | # v4kf:lock | V4kf | Core4 Lua Event System

## SYNOPSIS

rdrhandle:lock()

## DESCRIPTION

Insertion readers: Attempts to lock the inserted card agains removal.

Motorized readers: Engages the chip contact.

This command can only be used if the reader is in the Inserted state.

When this state completes successfully, it will enter the Locked state.

The command returns immediately. Actual execution of any reader operation is done within the event loop.

## NOTES

Please note that for insertion readers, locking of the card might fail. This will happen if the user is pulling out the card just in the same moment the lock comand was given. The software must expect that the reader switches into the Closed instead of the Locked state if that happens.

Consider asking for card locking with the v4kf:insert() command instead, which will do the locking at insertion time.

## SEE ALSO

v4kf:eject, v4kf:capture, v4kf:init, v4kf:insert, v4kf:reset, v4kf:state