choiceKeystroke

open suspend fun choiceKeystroke(fieldName: String, selection: PdfChoiceSelection): PdfChoiceSelection?(source)

Runs the selection-change keystroke without storing it. A viewer calls this for each proposed row, including deferred lists, then calls commitChoice when the reader commits (Adobe Acrobat JavaScript reference, Field/Keystroke and commitOnSelChange). Returns the accepted, possibly rewritten choice, or null when it was refused.

The default adapts a single display label through keystroke. A multiple selection needs supportsMultipleChoices; a capable typed handler can override this for its own scripts.


open suspend fun choiceKeystroke(fieldName: String, selection: PdfChoiceSelection, previous: PdfChoiceSelection): PdfChoiceSelection?(source)

Runs a choice keystroke with the previous accepted draft as its event value. A deferred selection has not reached formState, so a viewer supplies it here for consecutive row changes. The default retains the two-argument custom-handler compatibility path.