# US 2015/0106700 A1 · Display and selection of bidirectional text

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2015/0106700 A1
- Document ID: US20150106700A1
- Status: Published application
- Kind: A1
- Application number: 14/052,655
- Filed: 2013-10-11
- Published: 2015-04-16
- Earliest claimed: 2013-10-11
- Assignees: Apple Inc.
- Applicants: Apple Inc.
- Inventors: Adil Allawi
- Web page: https://patentgrep.com/patent/US20150106700A1

## CPC

- G06F 40/129: Handling non-Latin characters, e.g. kana-to-kanji conversion
- G06F 3/018: {Input/output arrangements for oriental characters}
- G06F 3/0233: {Character input methods}
- G06F 3/04883: for inputting data by handwriting, e.g. gesture or text
- G06F 40/166: Editing, e.g. inserting or deleting
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are disclosed for editing bidirectional text, including techniques for creating, selecting, inserting, and copying bidirectional text. The disclosed techniques include a method of inserting a character in bidirectional text. The method includes receiving the character, identifying a caret location at which a visual text insertion caret is positioned in displayed bidirectional text, the caret location separating a left character and a right character having opposite text directions, determining a logical insertion location at which the character is to be stored in a data store, wherein the logical insertion location is based on logical locations of the left and right characters in the data store, a text direction of the received character, and text directions of the left and right characters, and inserting the character into the data store at the logical insertion location.

## Claims

### Claim 1

A method of inserting a character in bidirectional text, the method comprising:
receiving, by a computer system, the character;
identifying a caret location at which a visual text insertion caret is positioned in displayed bidirectional text, the caret location separating a left character and a right character having opposite text directions;
determining a logical insertion location at which the character is to be stored in a data store, wherein the logical insertion location is based on logical locations of the left and right characters in the data store, a text direction of the received character, and text directions of the left and right characters; and
inserting the character into the data store at the logical insertion location.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
determining, based on the caret location, a visual insertion location between the left and right characters at which the character is to be inserted in the displayed bidirectional text; and
displaying the character in the displayed text at the visual insertion location.

### Claim 3 (depends on 2)

The method of claim 2, wherein the visual insertion location is on a side of the caret associated with left-to-right text when the keyboard is a left-to-right keyboard, and the visual insertion location is on a side of the caret associated with right-to-left text when the keyboard is a right-to-left keyboard.

### Claim 4 (depends on 1)

The method of claim 1, wherein determining a logical insertion location comprises:
determining whether the input string and the left character have the same direction; and
in response to determining that the input string and the left character have the same direction, inserting the character into the data store at a location adjacent to that of the left character.

### Claim 5 (depends on 4)

The method of claim 4, wherein the location adjacent to that of the left character is a data store location located before the left character when the left character has a right-to-left direction, and a data store location located after the left character when the left character has a left-to-right direction.

### Claim 6 (depends on 1)

The method of claim 1, wherein determining a logical insertion location comprises:
determining whether the input string and the right character have the same direction; and
in response to determining that the input string and the right character have the same direction, inserting the character into the data store at a location adjacent to that of the right character.

### Claim 7 (depends on 6)

The method of claim 6, wherein the location adjacent to that of the right character is a data store location after the right character when the right character has a right-to-left direction, and a data store location before the right character when the right character has a left-to-right direction.

### Claim 8

A method of pasting bidirectional text, the method comprising:
receiving, by a computer system, a request to paste first bidirectional text into second bidirectional text;
identifying a caret location at which a visual text insertion caret is positioned in the second bidirectional text, the caret location separating a left character and a right character having opposite text directions;
inserting each run of characters in the bidirectional text into the second bidirectional text at the beginning of a run adjacent to the caret location, wherein the run adjacent to the caret location is of the same direction as the run of characters being inserted, and each run is a sequence of characters displayed contiguously and having the same direction; and
moving the caret location to a position adjacent to the rightmost character of the inserted run of characters subsequent to inserting each run of characters.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
copying a portion of bidirectional text identified by a visual selection to form the first bidirectional text, wherein the visual selection comprises one or more runs of characters, each of the one or more runs of characters includes a start memory location and an end memory location, and
the copying comprises copying the characters from the range indicated by the start and end memory locations to form a copy of each of the runs in the first bidirectional text.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
removing a portion of bidirectional text identified by a visual selection from a block of bidirectional text, wherein the removing comprises:
copying the text identified by the visual selection;
deleting one or more runs of characters visual selection from the block of bidirectional text; and
setting the selection to a point on a right edge of a character to the left of the selection.

### Claim at position 11

11-20. (canceled)

### Claim 21

A method of selecting bidirectional text on a computing device having a touch screen display, the method comprising:
receiving, by the touch screen display, a first touch input that identifies a first character of a selection of a plurality of characters of bidirectional text;
receiving, by the touch screen display, a second touch input that identifies a last character of the selection of the plurality of characters of bidirectional text,
wherein the bidirectional text includes at least one left-to-right character and at least one right-to-left character;
generating, by the computing device, a visual selection based upon the first and last characters; and
displaying, by the touch screen display, the visual selection, wherein the displaying comprises highlighting the first character, the last character, and every character displayed between the first and last characters.

### Claim 22 (depends on 21)

The method of claim 21, wherein the displaying comprises highlighting only the first character, the last character, and every character displayed between the first and last characters in response to the selection being extended to include the first character or last character.

### Claim 23 (depends on 21)

The method of claim 21, wherein the selection continues to include only the first character, the last character, and every character displayed between the first and last characters in response to the selection crossing a boundary between LTR and RTL characters.

### Claim 24 (depends on 21)

The method of claim 21, further comprising:
displaying, by the touch screen display, head and tail indicators, corresponding to the first and last characters, at the beginning and end of the selection, respectively, wherein the head and tail indicators remain displayed at the beginning and end of the selection in response to the selection crossing a border between LTR and RTL text.

### Claim 25 (depends on 21)

The method of claim 21, wherein the displaying comprises highlighting only the first character, the last character, and every character displayed between the first and last characters in response to the selection being extended to include the first character or last character.

### Claim 26 (depends on 24)

The method of claim 24, wherein the displayed head and tail indicators remain on their respective sides of the selection and do not cross each other in response to the selection extending across a border between LTR and RTL text.

### Claim 27 (depends on 21)

The method of claim 21, wherein the displaying comprises highlighting only the first character, the last character, and every character displayed between the first and last characters in response to the selection being extended to include the first character or last character.

### Claim 28 (depends on 21)

The method of claim 21, further comprising:
generating, by the computing device, a logical selection that includes the selected characters, wherein the characters in the logical selection are ordered according to the order in which they are stored in a memory of the computing device, and the logical selection includes one or more runs of contiguously-stored characters.

### Claim at position 20

29-34. (canceled)

### Claim 35 (depends on 1)

The method of claim 1, further comprising:
receiving, by the computer system, a logical selection of characters, the selection including at least one left-to-right character and at least one right-to-left character;
identifying, by the computer system, visually leftmost and visually rightmost selected characters of each line of text in the logical group, wherein the identifying comprises searching each run of characters on the line for the head and tail characters of the line;
generating, by the computer system, the visual selection using the head and tail characters of the line as head and tail characters of the visual selection; and
displaying, by the computer system, the visual selection, wherein the displaying comprises highlighting the head character of the visual selection, the tail character of the visual selection, and every character displayed therebetween.

### Claim 36 (depends on 1)

The method of claim 1, further comprising:
receiving, by the computer system, a logical start location and a logical end location that identify a start character and an end character of a logical selection, respectively;
identifying, by the computer system, a visually leftmost character in the logical selection;
identifying, by the computer system, a visually rightmost character in the logical selection; and
generating, by the computer system, the visual selection using the visually leftmost character as a head character of the visual selection and the visually rightmost character as a tail character of the selection.
