Recognize function keys in passwords strings inserted via confd_cli

Is it possible to recognize if a function key was pressed during a password input in confd_cli?
Depending on the terminal, function keys are translated to a certain key sequence.
For example the F1 keystroke in some terminals is translated to ‘OP’ characters same as if O and P keys were pressed.
Is it possible to distinguish the two cases somehow and for example reject the password in the first case but accept i in the other case?