Add support to ctrl-arrow to tags in text fields.

Description

Add support to use Ctrl + right arrow and Ctrl + left arrow in text fields, to jump to and select the next and previous {__} token, respectively.

This will better support macros that require users to progressively fill in text. E.g. a macro could generate:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Reason: {__} History: {__} Current medications: {__} What Preventative health cover is being used and do you need to purchase any today? {__} Vaccination: {__} Worming: {__} Flea control: {__} Heartworm Prevention: {__} Examine: {__} Mentation: {__} Body condition score: {__} MM: {__} CRT: {__} HR: {__} RR: {__} LN: {__} Temperature: {__}

Users would then ctrl + arrow to each {__}, which would be replaced as the user types.

If there are no tags, then ctrl + arrow should revert to the browser default. On Firefox, this is 'move to previous word' for Ctrl-left arrow and 'move to next word' for Ctrl-right arrow.
If Ctrl+shift+arrow is pressed, then the browser default behaviour should be used. On Firefox, this selects a region.

NOTE: this will not work in the Mail editor, which uses an editable iframe rather than a text field.

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Fix versions

Priority

Minor
Configure