WO2018103352A1 - Cursor positioning method and device for mobile terminal, and mobile terminal - Google Patents

Cursor positioning method and device for mobile terminal, and mobile terminal Download PDF

Info

Publication number
WO2018103352A1
WO2018103352A1 PCT/CN2017/095400 CN2017095400W WO2018103352A1 WO 2018103352 A1 WO2018103352 A1 WO 2018103352A1 CN 2017095400 W CN2017095400 W CN 2017095400W WO 2018103352 A1 WO2018103352 A1 WO 2018103352A1
Authority
WO
WIPO (PCT)
Prior art keywords
column
target
preset
cursor
detected
Prior art date
Application number
PCT/CN2017/095400
Other languages
French (fr)
Chinese (zh)
Inventor
杨祥陵
Original Assignee
西安中兴新软件有限责任公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 西安中兴新软件有限责任公司 filed Critical 西安中兴新软件有限责任公司
Publication of WO2018103352A1 publication Critical patent/WO2018103352A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • G06F3/03547Touch pads, in which fingers can move on a surface
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0354Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of 2D relative movements between the device, or an operating part thereof, and a plane or surface, e.g. 2D mice, trackballs, pens or pucks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures

Definitions

  • the present application relates to, but is not limited to, the field of terminals, and in particular, to a cursor positioning method, device and mobile terminal for a mobile terminal.
  • buttons to the input method to move the cursor press to move one character, and long press to move multiple character positions in rapid succession, so that you can reach the beginning, end, bottom, and end of the line.
  • adding buttons to the limited space of the input method control panel will take up the input method keyboard space, which is not realistic.
  • the operation is not direct enough. First, click the selection button on the input method control panel to bring up the selection panel, and then continue to click the direction button on the selection panel to move the cursor. Therefore, this method takes up space in the input method keyboard and is complicated to operate.
  • the present invention provides a cursor positioning method, device and mobile terminal for a mobile terminal, which can quickly position the cursor to the beginning, end, column, and end of the column by the user's preset click operation and preset sliding operation. It occupies the space of the input method keyboard, and the operation is simple and convenient.
  • An embodiment of the present disclosure provides a cursor positioning method for a mobile terminal, including:
  • the cursor is positioned according to the preset sliding operation The beginning of the row of the target row or the end of the row of the target row or the beginning of the column of the target column or the end of the column of the target column.
  • the method further includes:
  • positioning a cursor to a line head of the target line or a line ending of the target line or a column head or the target of the target column including:
  • the cursor When the sliding direction is toward the end of the line of the target line, the cursor is positioned to the end of the line of the target line;
  • the cursor is positioned to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
  • the text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
  • the cursor When the distance from the click position to the right border is within a second preset range, the cursor is positioned to the end of the target line;
  • the cursor is positioned at the end of the column of the target column.
  • the step of determining whether a preset click operation is detected in a text editing area of the mobile terminal includes:
  • the step of determining whether a preset sliding operation is detected on a touch screen of the mobile terminal comprises:
  • the determining whether the pressure on the sliding trajectory of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased Steps include:
  • the embodiment of the present disclosure further provides a cursor positioning device for a mobile terminal, including:
  • the first determining module is configured to: determine whether a preset click operation is detected in a text editing area of the mobile terminal;
  • the acquiring module is configured to: when the first determining module determines that the preset click operation is detected, obtain a target row and a target column where the click position of the preset click operation is located;
  • the second determining module is configured to: determine whether a preset sliding operation is detected on the touch screen of the mobile terminal;
  • a first positioning module configured to: when the second determining module determines that the preset sliding operation is detected, according to the preset sliding operation, positioning a cursor to a line head or the target of the target line The end of the line of the line or the beginning of the column of the target column or the end of the column of the target column.
  • the apparatus further includes:
  • a second positioning module configured to: when the second determining module determines that the preset sliding operation is not detected, locate a cursor to the target according to a distance from the click position to a boundary of the text editing area The beginning of the line or the end of the line of the target line or the beginning of the column of the target column or the end of the column of the target column.
  • the first positioning module includes:
  • the direction determining unit is configured to: obtain a sliding direction of the preset sliding operation
  • a first positioning unit configured to: when the sliding direction is toward a line head of the target line, positioning the cursor to a line head of the target line;
  • a second positioning unit configured to: when the sliding direction is toward a line ending of the target line, positioning the cursor to a tail of the target line;
  • a third positioning unit configured to: when the sliding direction is toward a column head of the target column, positioning the cursor to a column head of the target column;
  • the fourth positioning unit is configured to position the cursor to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
  • the text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
  • the second positioning module includes:
  • a fifth positioning unit configured to: when the distance from the click position to the left boundary is within a first preset range, positioning the cursor to a line head of the target line;
  • a sixth positioning unit configured to: when the distance from the click position to the right boundary is within a second preset range, positioning the cursor to a tail end of the target line;
  • a seventh positioning unit configured to: when the distance from the click position to the upper boundary is within a third preset range, positioning the cursor to a column head of the target column;
  • the eighth positioning unit is configured to: when the distance from the click position to the lower boundary is within a fourth preset range, position the cursor to the end of the column of the target column.
  • the first determining module includes:
  • a pressure acquiring unit configured to: acquire a pressure value at a click position of a click operation detected in a text editing area of the mobile terminal;
  • the first determining unit is configured to: when the pressure value at the click position exceeds a preset threshold, determine that the preset click operation is detected.
  • the second determining module includes:
  • the determining unit is configured to: determine whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased;
  • the second determining unit is configured to determine that the preset sliding operation is detected if the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases.
  • the determining unit comprises:
  • the sampling subunit is configured to: at every preset distance, determine a sampling point on the sliding track of the detected sliding operation, and collect the pressure value at the sampling point and the operation object at the sampling point Speed value
  • the first determining subunit is configured to: determine whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collecting;
  • the second determining subunit is configured to: determine whether the speed value of the operation object at the plurality of sampling points is gradually increased according to the collected time sequence.
  • the embodiment of the present disclosure further provides a mobile terminal, including the cursor positioning device of the mobile terminal described above.
  • the embodiment of the present disclosure further provides a computer readable storage medium storing computer executable instructions that implement the cursor positioning method of the mobile terminal when the computer executable instructions are executed.
  • the target row and the target column where the click location is located are acquired, and when the preset sliding operation is detected, the cursor is positioned to the target according to the sliding operation.
  • the end of the line or the end of the target line or the end of the column of the target column thereby avoiding the cursor positioning caused by the insensitivity of the touch screen edge of the mobile terminal, and sliding by the user's preset click operation and preset
  • the operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient.
  • FIG. 1 shows a flow chart of a cursor positioning method of a mobile terminal according to an embodiment of the present disclosure
  • FIG. 2 is a block diagram showing the structure of a cursor positioning device of a mobile terminal according to an embodiment of the present disclosure
  • FIG. 3 is a block diagram showing the structure of an optional cursor positioning device of a mobile terminal according to an embodiment of the present disclosure.
  • An embodiment of the present disclosure provides a cursor positioning method for a mobile terminal. As shown in FIG. 1 , the method includes:
  • Step 101 Determine whether a preset click operation is detected in the text editing area of the mobile terminal.
  • a text editing area can be displayed, and a cursor can be flashed in the text editing area to indicate the current text editing position.
  • the cursor needs to be positioned to the corresponding line head or line. The end of the tail or column or the end of the column.
  • the cursor can be positioned to the beginning or end of the line or the beginning or the end of the column by a preset click operation and a preset sliding operation applied by the user on the mobile terminal.
  • the click position when a click operation is detected in the text editing area of the mobile terminal, the click position may be determined. Whether the pressure value at the location exceeds a preset threshold, and when the preset threshold is exceeded, it may be determined that the preset click operation is detected. That is, the preset click operation may be a user's slamming operation in the text editing area, and the slamming force reaches a preset threshold.
  • step 101 includes: acquiring a pressure value at a click position of the click operation detected in the text editing area of the mobile terminal; when the pressure value at the click position exceeds a preset threshold, determining to detect The preset click operation.
  • Step 102 If the preset click operation is detected, obtain a target row and a target column where the click position of the preset click operation is located.
  • the preset click operation determines the target line where the cursor is to be positioned, the target line where the end of the line is located, and the target column where the first column and the end of the column are located. Therefore, when the preset click operation applied by the user in the text editing area of the mobile terminal is detected, it is necessary to acquire the target line and the target column where the click position is located.
  • the location coordinates of the click location of the preset click operation may be first obtained, and then the target row and the target column where the click location is located are determined according to the location coordinates.
  • Step 103 Determine whether a preset sliding operation is detected on the touch screen of the mobile terminal.
  • the preset sliding operation determines whether the cursor needs to be positioned at the beginning of the line of the target line, or at the end of the line, or at the beginning of the column of the target column, or at the end of the column.
  • the preset sliding operation may take a click position of the preset click operation as a starting position, or may not use a click position of the click operation as a starting position.
  • the preset sliding operation is the starting position of the preset click operation, the user can make a one-time operation when the preset click operation and the preset sliding operation are applied, thereby facilitating the user's operation.
  • step 103 includes: determining whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operation object of the sliding operation is gradually increasing; If the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases, it is determined that the preset sliding operation is detected.
  • the sliding operation can be first detected, and then it can be determined whether the pressure on the sliding track of the sliding operation is gradually Decrease, and whether the sliding speed of the user's finger is gradually increased, and only if the detected sliding operation can satisfy the above two conditions, it can be determined that the preset sliding operation is detected. That is, the preset sliding operation can quickly slide the user's finger on the touch screen, and the operation of gradually decreasing the force is applied.
  • the method may include: sampling the sliding track according to the preset distance d, and if the time interval between each adjacent two sampling points is less than the preset time interval t, indicating the detected The operation is a sliding operation; or a point is collected every predetermined time interval t of the sliding track. If the distance between each adjacent two sampling points is less than the preset distance d, it indicates that the detected operation is a sliding operation.
  • the step of determining whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased includes :
  • the preset distance may be first Sampling on the sliding track, and obtaining the pressure value at each sampling point, and the speed value of the operating object; then, sorting the pressure values of the plurality of sampling points, and sorting the speed values of the operating objects; then, Whether the pressure is gradually decreased according to the sampling time of the sampling point, and whether the speed value of the operating object gradually increases according to the sampling time of the sampling point.
  • the speed value of the operation object at each sampling point may be represented by an average speed value of a preset distance immediately adjacent to the sampling point.
  • the detected sliding operation can be determined. Belongs to the preset sliding operation.
  • the preset sliding operation applied in the embodiment of the present disclosure is different from the operation of selecting a text (the contact touch screen level is continuously and forcefully continuously moving), thereby positioning the cursor to the beginning of the line or by using a preset sliding operation. At the end of the line or at the beginning or end of the column, it does not conflict with the normal use of the mobile terminal.
  • Step 104 If the preset sliding operation is detected, according to the preset sliding operation, the cursor is positioned to the beginning of the target line or the end of the target line or the beginning of the target column or The end of the column of the target column.
  • step 104 includes: acquiring a sliding direction of the preset sliding operation; and positioning the cursor to a beginning of the target line when the sliding direction is toward a line head of the target line; When the sliding direction is toward the end of the line of the target line, the cursor is positioned to the end of the line of the target line; when the sliding direction is toward the beginning of the column of the target column, the cursor is positioned to the a column head of the target column; when the sliding direction is toward the end of the column of the target column, the cursor is positioned to the end of the column of the target column. That is, in the embodiment of the present disclosure, the cursor can be positioned to the beginning of the line, the end of the line, the beginning of the column, or the end of the column by using the sliding direction of the sliding operation.
  • the user can hit any position on the target line, then quickly slide to the first direction of the line (ie, to the left), and control the contact force between the finger and the touch screen. Gradually lighten until leaving the touch screen, causing the mobile terminal to position the cursor at the beginning of the target line.
  • the user can hit any position on the target line, then swipe to the end of the line (ie, to the right), and control the contact force of the finger with the touch screen to gradually reduce until it leaves.
  • the touch screen causes the mobile terminal to position the cursor at the end of the line of the target line.
  • the user can click anywhere on the target column, then quickly slide in the first direction of the column (ie, up), and control the contact between the finger and the touch screen to gradually reduce until the touch screen is left. So that the mobile terminal positions the cursor to the top of the target column.
  • the user can click anywhere on the target column, then swipe toward the end of the column (ie, down), and control the contact between the finger and the touch screen to gradually reduce until it leaves.
  • the touch screen causes the mobile terminal to position the cursor at the end of the column of the target column.
  • the positioning of the cursor can be completed only by the preset click operation.
  • the cursor is positioned according to the distance between the click position of the preset click operation and the boundary of the text editing area. Then, if the preset sliding operation is not detected in the above step 103, the cursor may be positioned to the beginning of the target line or the target line according to the distance from the click position to the boundary of the text editing area. The end of the line or the beginning of the column of the target column or the end of the column of the target column.
  • the text editing area may be a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary, and the cursor is positioned to the cursor according to the distance from the click position to the boundary of the text editing area.
  • the beginning of the line of the target line or the end of the line of the target line or the end of the column of the target column or the end of the target column may include: when the distance from the click position to the left boundary is at the first preset Positioning the cursor to the beginning of the target line; positioning the cursor to the target when the distance from the click position to the right boundary is within a second predetermined range a line ending of a line; when the distance from the click position to the upper boundary is within a third predetermined range, positioning the cursor to a column head of the target column; when the click position is to the bottom When the distance of the boundary is within the fourth predetermined range, the cursor is positioned to the end of the column of the target column.
  • the first preset range, the second preset range, the third preset range, and the fourth preset range may be the same or different.
  • the target row and the target column where the click location is located are obtained, and then, when the preset sliding operation is detected, according to the sliding operation Position the cursor at the beginning of the line of the target line or the end of the target line or the end of the column of the target column, so as to avoid the cursor positioning caused by the insensitivity of the touch screen of the mobile terminal, and the user clicks through the preset
  • the operation and preset sliding operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient, thereby improving the user experience.
  • the embodiment of the present disclosure further provides a cursor positioning device for a mobile terminal.
  • the device 200 includes:
  • the first determining module 201 is configured to: determine whether a preset click operation is detected in a text editing area of the mobile terminal;
  • the obtaining module 202 is configured to: when the first determining module 201 determines that the preset click operation is detected, obtain a target row and a target column where the click location of the preset click operation is located;
  • the second determining module 203 is configured to: determine whether a preset sliding operation is detected on the touch screen of the mobile terminal;
  • the first positioning module 204 is configured to: when the second determining module 203 determines that the preset sliding operation is detected, according to the preset sliding operation, position the cursor to the beginning of the target line or the The end of the row of the target row or the beginning of the column of the target column or the end of the column of the target column.
  • the apparatus further includes:
  • the second positioning module 205 is configured to: when the second determining module 203 determines that the preset sliding operation is not detected, locate the cursor according to the distance from the click position to the boundary of the text editing area The beginning of the line of the target line or the end of the line of the target line or the beginning of the column of the target column or the end of the column of the target column.
  • the first positioning module 204 includes:
  • the direction determining unit 2041 is configured to: obtain a sliding direction of the preset sliding operation
  • the first positioning unit 2042 is configured to: when the sliding direction is toward a line head of the target line, positioning the cursor to a line head of the target line;
  • the second positioning unit 2043 is configured to: when the sliding direction is toward the end of the target line, Positioning the cursor at the end of the line of the target line;
  • the third positioning unit 2044 is configured to: when the sliding direction is toward a column head of the target column, positioning the cursor to a column head of the target column;
  • the fourth positioning unit 2045 is configured to position the cursor to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
  • the text editing area is a rectangular area formed by a left boundary, a right boundary, an upper boundary, and a lower boundary;
  • the second positioning module 205 includes:
  • the fifth positioning unit 2051 is configured to: when the distance from the click position to the left boundary is within the first preset range, locate the cursor to the beginning of the target line;
  • the sixth positioning unit 2052 is configured to: when the distance from the click position to the right boundary is within the second preset range, position the cursor to the end of the target line;
  • the seventh positioning unit 2053 is configured to: when the distance from the click position to the upper boundary is within a third preset range, positioning the cursor to a column head of the target column;
  • the eighth positioning unit 2054 is configured to: when the distance from the click position to the lower boundary is within a fourth preset range, position the cursor to the end of the column of the target column.
  • the first determining module 201 includes:
  • the pressure acquisition unit 2011 is configured to: acquire a pressure value at a click position of the click operation detected in the text editing area of the mobile terminal;
  • the first determining unit 2012 is configured to: when the pressure value at the click position exceeds a preset threshold, determine that the preset click operation is detected.
  • the second determining module 203 includes:
  • the determining unit 2031 is configured to: determine whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased;
  • the second determining unit 2032 is configured to determine that the preset sliding operation is detected if the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases.
  • the determining unit 2031 includes:
  • the sampling sub-unit 20311 is configured to: at every preset distance, determine a sampling point on the sliding track of the detected sliding operation, and collect the pressure value at the sampling point and the operation object at the sampling point Speed value
  • the first determining subunit 20312 is configured to: determine whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collecting;
  • the second judging subunit 20313 is configured to: determine whether the speed values of the operation object at the plurality of sampling points are gradually increased according to the time sequence of the collection.
  • the trigger obtaining module 202 acquires the preset. Clicking the target row and the target column where the click position of the operation is located, so that the second judging module 203 determines whether a preset sliding operation is detected on the touch screen of the mobile terminal, and triggers when the preset sliding operation is detected.
  • the first positioning module 204 positions the cursor to the beginning of the line of the target line or the end of the target row or the column header of the target column or the end of the target column according to the preset sliding operation, thereby It is difficult to avoid cursor positioning caused by the insensitivity of the edge of the touch screen of the mobile terminal, and the cursor can be quickly positioned to the beginning, end of the column, column head, and column end by the user's preset click operation and preset sliding operation, and does not occupy the input.
  • the space of the keyboard is simple and convenient to operate.
  • Embodiments of the present disclosure also provide a mobile terminal, including the cursor positioning device of the mobile terminal described above. Therefore, the mobile terminal of the embodiment of the present disclosure can acquire the target row and the target column where the click location is located when the preset click operation is detected in the text editing area of the mobile terminal, and then, when the preset sliding operation is detected, according to the sliding The operation locates the cursor at the beginning of the line of the target line or the end of the target line or the end of the column of the target column or the end of the target column, thereby avoiding the difficulty of cursor positioning caused by the insensitivity of the edge of the touch screen of the mobile terminal, and through the user's preset Click operation and preset sliding operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient, which improves the market competitiveness of the product.
  • the embodiment of the present disclosure further provides a computer readable storage medium storing computer executable instructions that implement the cursor positioning method of the mobile terminal when the computer executable instructions are executed.
  • all or part of the steps of the foregoing embodiments may also be implemented by using an integrated circuit, and the steps may be separately fabricated into integrated circuit modules, or multiple modules thereof or The steps are made into a single integrated circuit module.
  • the devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
  • the device/function module/functional unit in the above embodiment When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium.
  • the above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
  • the target row and the target column where the click location is located are acquired, and when the preset sliding operation is detected, the cursor is positioned to the target according to the sliding operation.
  • the end of the line or the end of the target line or the end of the column of the target column thereby avoiding the cursor positioning caused by the insensitivity of the touch screen edge of the mobile terminal, and sliding by the user's preset click operation and preset
  • the operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient.

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

A cursor positioning method for a mobile terminal comprises: determining whether a preset click operation is detected in a text editing region of a mobile terminal; if the preset click operation is detected, acquiring a target row and a target column of a click location in which the preset click operation is performed; determining whether a preset sliding operation is detected on a touch screen of the mobile terminal; and if preset sliding operation is detected, positioning, according to the preset sliding operation, a cursor at the beginning or the end of the target row, or at the beginning or the end of the target column.

Description

一种移动终端的光标定位方法、装置及移动终端Cursor positioning method and device for mobile terminal and mobile terminal 技术领域Technical field
本申请涉及但不限于终端领域,尤其是一种移动终端的光标定位方法、装置及移动终端。The present application relates to, but is not limited to, the field of terminals, and in particular, to a cursor positioning method, device and mobile terminal for a mobile terminal.
背景技术Background technique
在使用手机过程中发现:当文字行尾接近触摸屏的边缘,希望定位光标到行首、行尾、列首、列尾。然而,经常会遇到因触摸屏边缘不敏感或失灵,导致无法将光标定位到行首、行尾、列首、列尾的情况。In the process of using the mobile phone, it is found that when the end of the text line is close to the edge of the touch screen, it is desirable to position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. However, it is often encountered that the cursor cannot be positioned at the beginning, end of the line, at the beginning of the column, or at the end of the column due to insensitivity or malfunction of the edge of the touch screen.
发明内容Summary of the invention
以下是对本文详细描述的主题的概述。本概述并非是为了限制权利要求的保护范围。The following is an overview of the topics detailed in this document. This Summary is not intended to limit the scope of the claims.
可以通过在输入法中增加四个方向按钮,用于移动光标,按一下移动一个字符,长按则快速连续移动多个字符位置,从而可以分别到达行首、行尾、列首、列尾。然而,在输入法控制面板的有限空间里增加按钮,会占用输入法键盘空间,不太现实。而且操作不够直接,首先点击输入法控制面板上的选择按钮,调出选择面板后,才能继续点击选择面板上的方向按钮以移动光标。因此,这种方式会占据输入法键盘的空间,且操作复杂。You can add four direction buttons to the input method to move the cursor, press to move one character, and long press to move multiple character positions in rapid succession, so that you can reach the beginning, end, bottom, and end of the line. However, adding buttons to the limited space of the input method control panel will take up the input method keyboard space, which is not realistic. Moreover, the operation is not direct enough. First, click the selection button on the input method control panel to bring up the selection panel, and then continue to click the direction button on the selection panel to move the cursor. Therefore, this method takes up space in the input method keyboard and is complicated to operate.
本文提供了一种移动终端的光标定位方法、装置及移动终端,通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,且操作简单方便。The present invention provides a cursor positioning method, device and mobile terminal for a mobile terminal, which can quickly position the cursor to the beginning, end, column, and end of the column by the user's preset click operation and preset sliding operation. It occupies the space of the input method keyboard, and the operation is simple and convenient.
本公开实施例提供了一种移动终端的光标定位方法,包括:An embodiment of the present disclosure provides a cursor positioning method for a mobile terminal, including:
判断在移动终端的文字编辑区域内是否检测到预设点击操作;Determining whether a preset click operation is detected in a text editing area of the mobile terminal;
若检测到所述预设点击操作,则获取所述预设点击操作的点击位置所在的目标行和目标列;If the preset click operation is detected, acquiring a target row and a target column where the click location of the preset click operation is located;
判断在所述移动终端的触摸屏上是否检测到预设滑动操作;Determining whether a preset sliding operation is detected on the touch screen of the mobile terminal;
若检测到所述预设滑动操作,则根据所述预设滑动操作,将光标定位到 所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。If the preset sliding operation is detected, the cursor is positioned according to the preset sliding operation The beginning of the row of the target row or the end of the row of the target row or the beginning of the column of the target column or the end of the column of the target column.
在一种示例性实施方式中,所述方法还包括:In an exemplary embodiment, the method further includes:
若未检测到所述预设滑动操作,则根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。If the preset sliding operation is not detected, positioning the cursor to the beginning of the target line or the end of the target line or the end according to the distance from the click position to the boundary of the text editing area The beginning of the column of the target column or the end of the column of the target column.
在一种示例性实施方式中,所述根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾,包括:In an exemplary embodiment, according to the preset sliding operation, positioning a cursor to a line head of the target line or a line ending of the target line or a column head or the target of the target column The end of the column, including:
获取所述预设滑动操作的滑动方向;Obtaining a sliding direction of the preset sliding operation;
当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;When the sliding direction is toward the beginning of the target line, positioning the cursor to the beginning of the target line;
当所述滑动方向朝向所述目标行的行尾时,将所述光标定位到所述目标行的行尾;When the sliding direction is toward the end of the line of the target line, the cursor is positioned to the end of the line of the target line;
当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;When the sliding direction is toward the column head of the target column, positioning the cursor to the column head of the target column;
当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。The cursor is positioned to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
在一种示例性实施方式中,所述文字编辑区域为由左边界、右边界、上边界和下边界构成的矩形区域;In an exemplary embodiment, the text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
所述根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾,包括:And positioning the cursor to the beginning of the target row or the end of the target row or the column header or the target column of the target column according to the distance from the click position to the boundary of the text editing area The end of the column, including:
当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;When the distance from the click position to the left boundary is within a first preset range, positioning the cursor to the beginning of the target line;
当所述点击位置到所述右边界的距离位于第二预设范围之内时,将所述光标定位到所述目标行的行尾;When the distance from the click position to the right border is within a second preset range, the cursor is positioned to the end of the target line;
当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;And positioning the cursor to the column head of the target column when the distance from the click position to the upper boundary is within a third preset range;
当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述 光标定位到所述目标列的列尾。When the distance from the click position to the lower boundary is within a fourth predetermined range, The cursor is positioned at the end of the column of the target column.
在一种示例性实施方式中,所述判断在移动终端的文字编辑区域内是否检测到预设点击操作的步骤,包括:In an exemplary embodiment, the step of determining whether a preset click operation is detected in a text editing area of the mobile terminal includes:
获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值;Obtaining a pressure value at a click position of a click operation detected in a text editing area of the mobile terminal;
当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。When the pressure value at the click position exceeds a preset threshold, it is determined that the preset click operation is detected.
在一种示例性实施方式中,所述判断在所述移动终端的触摸屏上是否检测到预设滑动操作的步骤,包括:In an exemplary embodiment, the step of determining whether a preset sliding operation is detected on a touch screen of the mobile terminal comprises:
判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;Determining whether the pressure on the sliding trajectory of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operation object of the sliding operation is gradually increased;
若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。If the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases, it is determined that the preset sliding operation is detected.
在一种示例性实施方式中,所述判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大的步骤,包括:In an exemplary embodiment, the determining whether the pressure on the sliding trajectory of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased Steps include:
每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值;Determining a sampling point on the sliding track of the detected sliding operation every preset distance, and collecting the pressure value at the sampling point and the speed value of the operating object at the sampling point;
判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;Determining whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collection;
判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。It is determined whether the speed values of the operation object at the plurality of sampling points are gradually increased in accordance with the time sequence of the acquisition.
本公开实施例还提供了一种移动终端的光标定位装置,包括:The embodiment of the present disclosure further provides a cursor positioning device for a mobile terminal, including:
第一判断模块,设置为:判断在移动终端的文字编辑区域内是否检测到预设点击操作;The first determining module is configured to: determine whether a preset click operation is detected in a text editing area of the mobile terminal;
获取模块,设置为:当所述第一判断模块判断检测到所述预设点击操作时,获取所述预设点击操作的点击位置所在的目标行和目标列;The acquiring module is configured to: when the first determining module determines that the preset click operation is detected, obtain a target row and a target column where the click position of the preset click operation is located;
第二判断模块,设置为:判断在所述移动终端的触摸屏上是否检测到预设滑动操作;The second determining module is configured to: determine whether a preset sliding operation is detected on the touch screen of the mobile terminal;
第一定位模块,设置为:当所述第二判断模块判断检测到所述预设滑动操作时,根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目 标行的行尾或所述目标列的列首或所述目标列的列尾。a first positioning module, configured to: when the second determining module determines that the preset sliding operation is detected, according to the preset sliding operation, positioning a cursor to a line head or the target of the target line The end of the line of the line or the beginning of the column of the target column or the end of the column of the target column.
在一种示例性实施方式中,所述装置还包括:In an exemplary embodiment, the apparatus further includes:
第二定位模块,设置为:当所述第二判断模块判断未检测到所述预设滑动操作时,根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。a second positioning module, configured to: when the second determining module determines that the preset sliding operation is not detected, locate a cursor to the target according to a distance from the click position to a boundary of the text editing area The beginning of the line or the end of the line of the target line or the beginning of the column of the target column or the end of the column of the target column.
在一种示例性实施方式中,所述第一定位模块包括:In an exemplary embodiment, the first positioning module includes:
方向确定单元,设置为:获取所述预设滑动操作的滑动方向;The direction determining unit is configured to: obtain a sliding direction of the preset sliding operation;
第一定位单元,设置为:当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;a first positioning unit configured to: when the sliding direction is toward a line head of the target line, positioning the cursor to a line head of the target line;
第二定位单元,设置为:当所述滑动方向朝向所述目标行的行尾时,将所述光标定位到所述目标行的行尾;a second positioning unit configured to: when the sliding direction is toward a line ending of the target line, positioning the cursor to a tail of the target line;
第三定位单元,设置为:当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;a third positioning unit, configured to: when the sliding direction is toward a column head of the target column, positioning the cursor to a column head of the target column;
第四定位单元,设置为:当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。The fourth positioning unit is configured to position the cursor to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
在一种示例性实施方式中,所述文字编辑区域为由左边界、右边界、上边界和下边界构成的矩形区域;In an exemplary embodiment, the text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
所述第二定位模块包括:The second positioning module includes:
第五定位单元,设置为:当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;a fifth positioning unit, configured to: when the distance from the click position to the left boundary is within a first preset range, positioning the cursor to a line head of the target line;
第六定位单元,设置为:当所述点击位置到所述右边界的距离位于第二预设范围之内时,将所述光标定位到所述目标行的行尾;a sixth positioning unit, configured to: when the distance from the click position to the right boundary is within a second preset range, positioning the cursor to a tail end of the target line;
第七定位单元,设置为:当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;a seventh positioning unit, configured to: when the distance from the click position to the upper boundary is within a third preset range, positioning the cursor to a column head of the target column;
第八定位单元,设置为:当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述光标定位到所述目标列的列尾。The eighth positioning unit is configured to: when the distance from the click position to the lower boundary is within a fourth preset range, position the cursor to the end of the column of the target column.
在一种示例性实施方式中,所述第一判断模块包括:In an exemplary embodiment, the first determining module includes:
压力获取单元,设置为:获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值; a pressure acquiring unit configured to: acquire a pressure value at a click position of a click operation detected in a text editing area of the mobile terminal;
第一确定单元,设置为:当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。The first determining unit is configured to: when the pressure value at the click position exceeds a preset threshold, determine that the preset click operation is detected.
在一种示例性实施方式中,所述第二判断模块包括:In an exemplary embodiment, the second determining module includes:
判断单元,设置为:判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;The determining unit is configured to: determine whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased;
第二确定单元,设置为:若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。The second determining unit is configured to determine that the preset sliding operation is detected if the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases.
在一种示例性实施方式中,判断单元包括:In an exemplary embodiment, the determining unit comprises:
采样子单元,设置为:每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值;The sampling subunit is configured to: at every preset distance, determine a sampling point on the sliding track of the detected sliding operation, and collect the pressure value at the sampling point and the operation object at the sampling point Speed value
第一判断子单元,设置为:判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;The first determining subunit is configured to: determine whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collecting;
第二判断子单元,设置为:判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。The second determining subunit is configured to: determine whether the speed value of the operation object at the plurality of sampling points is gradually increased according to the collected time sequence.
本公开实施例还提供了一种移动终端,包括上述所述的移动终端的光标定位装置。The embodiment of the present disclosure further provides a mobile terminal, including the cursor positioning device of the mobile terminal described above.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述移动终端的光标定位方法。The embodiment of the present disclosure further provides a computer readable storage medium storing computer executable instructions that implement the cursor positioning method of the mobile terminal when the computer executable instructions are executed.
本公开实施例的有益效果是:The beneficial effects of the embodiments of the present disclosure are:
本公开的实施例,在移动终端的文字编辑区域内检测到预设点击操作时,获取点击位置所在的目标行和目标列,在检测到预设滑动操作时,根据滑动操作将光标定位到目标行的行首或目标行的行尾或目标列的列首或目标列的列尾,从而避免移动终端触摸屏的边缘不灵敏造成的光标定位困难,并且通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,操作简单方便。In the embodiment of the present disclosure, when a preset click operation is detected in the text editing area of the mobile terminal, the target row and the target column where the click location is located are acquired, and when the preset sliding operation is detected, the cursor is positioned to the target according to the sliding operation. The end of the line or the end of the target line or the end of the column of the target column, thereby avoiding the cursor positioning caused by the insensitivity of the touch screen edge of the mobile terminal, and sliding by the user's preset click operation and preset The operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient.
在阅读并理解了附图和详细描述后,可以明白其他方面。Other aspects will be apparent upon reading and understanding the drawings and detailed description.
附图概述BRIEF abstract
图1表示根据本公开实施例的移动终端的光标定位方法的流程图; 1 shows a flow chart of a cursor positioning method of a mobile terminal according to an embodiment of the present disclosure;
图2表示根据本公开实施例的移动终端的光标定位装置的结构框图;2 is a block diagram showing the structure of a cursor positioning device of a mobile terminal according to an embodiment of the present disclosure;
图3表示根据本公开实施例的可选的移动终端的光标定位装置的结构框图。FIG. 3 is a block diagram showing the structure of an optional cursor positioning device of a mobile terminal according to an embodiment of the present disclosure.
本公开的较佳实施方式Preferred embodiment of the present disclosure
下面结合附图对本公开的实施方式进行描述。Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
本公开实施例提供了一种移动终端的光标定位方法,如图1所示,该方法包括:An embodiment of the present disclosure provides a cursor positioning method for a mobile terminal. As shown in FIG. 1 , the method includes:
步骤101:判断在移动终端的文字编辑区域内是否检测到预设点击操作。Step 101: Determine whether a preset click operation is detected in the text editing area of the mobile terminal.
移动终端进入文字编辑模式时,可以显示一文字编辑区域,且该文字编辑区域内可以闪烁显示一光标,用于指示当前的文字编辑位置。其中,当用户需要对字编辑区域内的某一行的行首或行尾处的文字,或某一列的列首或列尾处的文字进行编辑时,需要将光标定位到对应的行首或行尾或列首或列尾。而本公开的实施例中,可通过用户在移动终端上施加的预设点击操作和预设滑动操作,将光标定位到行首或行尾或列首或列尾。When the mobile terminal enters the text editing mode, a text editing area can be displayed, and a cursor can be flashed in the text editing area to indicate the current text editing position. Wherein, when the user needs to edit the text at the beginning or end of a line in a word editing area, or the text at the beginning or end of a column of a column, the cursor needs to be positioned to the corresponding line head or line. The end of the tail or column or the end of the column. In the embodiment of the present disclosure, the cursor can be positioned to the beginning or end of the line or the beginning or the end of the column by a preset click operation and a preset sliding operation applied by the user on the mobile terminal.
其中,为了将用于定位光标的预设点击操作与移动终端的常规点击操作区分开来,本公开的实施例中,在移动终端的文字编辑区域内检测到一点击操作时,可以判断点击位置处的压力值是否超于预设阈值,当超过预设阈值时,才可以确定检测到所述预设点击操作。即所述预设点击操作可以为用户在文字编辑区域内重击操作,且重击力度达到了预设阈值。In order to distinguish the preset click operation for positioning the cursor from the normal click operation of the mobile terminal, in the embodiment of the present disclosure, when a click operation is detected in the text editing area of the mobile terminal, the click position may be determined. Whether the pressure value at the location exceeds a preset threshold, and when the preset threshold is exceeded, it may be determined that the preset click operation is detected. That is, the preset click operation may be a user's slamming operation in the text editing area, and the slamming force reaches a preset threshold.
因此,可选地,步骤101包括:获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值;当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。Therefore, optionally, step 101 includes: acquiring a pressure value at a click position of the click operation detected in the text editing area of the mobile terminal; when the pressure value at the click position exceeds a preset threshold, determining to detect The preset click operation.
步骤102:若检测到所述预设点击操作,则获取所述预设点击操作的点击位置所在的目标行和目标列。Step 102: If the preset click operation is detected, obtain a target row and a target column where the click position of the preset click operation is located.
其中,预设点击操作决定着光标所要定位到的行首、行尾所在的目标行,以及列首、列尾所在的目标列。因而,当检测到用户在移动终端的文字编辑区域内施加的预设点击操作时,需要获取点击位置所在的目标行和目标列。可选地,可首先获取所述预设点击操作的点击位置的位置坐标,然后根据位置坐标确定点击位置所在的目标行和目标列。 Among them, the preset click operation determines the target line where the cursor is to be positioned, the target line where the end of the line is located, and the target column where the first column and the end of the column are located. Therefore, when the preset click operation applied by the user in the text editing area of the mobile terminal is detected, it is necessary to acquire the target line and the target column where the click position is located. Optionally, the location coordinates of the click location of the preset click operation may be first obtained, and then the target row and the target column where the click location is located are determined according to the location coordinates.
步骤103:判断在所述移动终端的触摸屏上是否检测到预设滑动操作。Step 103: Determine whether a preset sliding operation is detected on the touch screen of the mobile terminal.
其中,预设滑动操作决定着需要将光标定位到目标行的行首,还是行尾,还是定位到目标列的列首,还是列尾。另外,所述预设滑动操作可以以所述预设点击操作的点击位置为起始位置,也可以不以所述点击操作的点击位置为起始位置。其中,当预设滑动操作以所述预设点击操作的点击位置为起始位置时,使得用户在施加预设点击操作和预设滑动操作时可以一气呵成,从而更加方便用户的操作。Among them, the preset sliding operation determines whether the cursor needs to be positioned at the beginning of the line of the target line, or at the end of the line, or at the beginning of the column of the target column, or at the end of the column. In addition, the preset sliding operation may take a click position of the preset click operation as a starting position, or may not use a click position of the click operation as a starting position. Wherein, when the preset sliding operation is the starting position of the preset click operation, the user can make a one-time operation when the preset click operation and the preset sliding operation are applied, thereby facilitating the user's operation.
此外,可选地,步骤103包括:判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。In addition, optionally, step 103 includes: determining whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operation object of the sliding operation is gradually increasing; If the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases, it is determined that the preset sliding operation is detected.
即为了将用于定位光标的预设滑动操作与移动终端的常规滑动操作区分开来,本公开的实施例中,首先可以检测滑动操作,然后可以判断该滑动操作的滑动轨迹上的压力是否逐渐减小,以及用户手指的滑动速度是否逐渐增大,只有检测到的滑动操作能够满足上述两个条件,才可以确定检测到所述预设滑动操作。即预设滑动操作可以为用户的手指在触摸屏上的快速滑动,且施加力度逐渐减小的操作。That is, in order to distinguish the preset sliding operation for positioning the cursor from the normal sliding operation of the mobile terminal, in the embodiment of the present disclosure, the sliding operation can be first detected, and then it can be determined whether the pressure on the sliding track of the sliding operation is gradually Decrease, and whether the sliding speed of the user's finger is gradually increased, and only if the detected sliding operation can satisfy the above two conditions, it can be determined that the preset sliding operation is detected. That is, the preset sliding operation can quickly slide the user's finger on the touch screen, and the operation of gradually decreasing the force is applied.
其中,可选地,在检测滑动操作时,可以包括:对滑动轨迹按照预设距离d采样,若每相邻两个采样点之间的时间间隔小于预设时间间隔t,则表示检测到的操作是一个滑动操作;或者对滑动轨迹每隔预设时间间隔t采集一个点,若每相邻两个采样点之间的距离小于预设距离d,则表示检测到的操作是一个滑动操作。Optionally, when detecting the sliding operation, the method may include: sampling the sliding track according to the preset distance d, and if the time interval between each adjacent two sampling points is less than the preset time interval t, indicating the detected The operation is a sliding operation; or a point is collected every predetermined time interval t of the sliding track. If the distance between each adjacent two sampling points is less than the preset distance d, it indicates that the detected operation is a sliding operation.
另外,可选地,上述判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大的步骤,包括:In addition, optionally, the step of determining whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased, includes :
每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值;判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。Determining a sampling point on the sliding track of the detected sliding operation every preset distance, and collecting the pressure value at the sampling point and the speed value of the operating object at the sampling point; determining multiple sampling Whether the pressure value of the point gradually decreases according to the time sequence of the acquisition; whether the speed value of the operation object at the plurality of sampling points is gradually increased according to the time sequence of the acquisition.
即在移动终端的触摸屏上检测到一滑动操作时,可以首先按照预设距离 在滑动轨迹上进行采样,并获取每一个采样点处的压力值,以及操作对象的速度值;然后,将多个采样点的压力值进行排序,并将操作对象的速度值进行排序;然后,判断压力时是否按照采样点的采集时间顺序逐渐减小,操作对象到的速度值是否按照采样点的采集时间顺序逐渐增大。That is, when a sliding operation is detected on the touch screen of the mobile terminal, the preset distance may be first Sampling on the sliding track, and obtaining the pressure value at each sampling point, and the speed value of the operating object; then, sorting the pressure values of the plurality of sampling points, and sorting the speed values of the operating objects; then, Whether the pressure is gradually decreased according to the sampling time of the sampling point, and whether the speed value of the operating object gradually increases according to the sampling time of the sampling point.
其中,可选地,操作对象在每一个采样点处的速度值,可用与采样点紧邻的预设距离的平均速度值进行表示。例如,在滑动轨迹上包括A、B、C三个采样点,假设这三个采样点的采集时间顺序是TA<TB<TC,且AB之间距离为DAB,平均速度为SAB=DAB/(TB-TA),BC之间距离为DBC,平均速度为SBC=DBC/(TC-TB),则操作对象在A点的速度表示为SAB,在B点的速度表示为SBC。另外,若A点的压力值为x1,B点的压力值为x2,C点的压力值为x3,则当x1>x2>x3,且SAB<SBC时,可以确定检测到的滑动操作属于预设滑动操作。Optionally, the speed value of the operation object at each sampling point may be represented by an average speed value of a preset distance immediately adjacent to the sampling point. For example, three sampling points of A, B, and C are included on the sliding track, and the sampling time sequence of the three sampling points is assumed to be T A <T B <T C , and the distance between AB is D AB , and the average speed is S AB = D AB / (T B - T A ), the distance between BC is D BC , and the average speed is S BC = D BC / (T C - T B ), then the speed of the operating object at point A is expressed as S AB The speed at point B is expressed as S BC . In addition, if the pressure value at point A is x1, the pressure value at point B is x2, and the pressure value at point C is x3, then when x1>x2>x3 and S AB <S BC , the detected sliding operation can be determined. Belongs to the preset sliding operation.
由此可知,本公开的实施例中所应用的预设滑动操作有别于选择文字的操作(接触触摸屏幕水平平均用力地连续移动),从而在利用预设滑动操作将光标定位到行首或行尾或列首或列尾时,不会与移动终端的正常使用相冲突。It can be seen that the preset sliding operation applied in the embodiment of the present disclosure is different from the operation of selecting a text (the contact touch screen level is continuously and forcefully continuously moving), thereby positioning the cursor to the beginning of the line or by using a preset sliding operation. At the end of the line or at the beginning or end of the column, it does not conflict with the normal use of the mobile terminal.
步骤104:若检测到所述预设滑动操作,则根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。Step 104: If the preset sliding operation is detected, according to the preset sliding operation, the cursor is positioned to the beginning of the target line or the end of the target line or the beginning of the target column or The end of the column of the target column.
可选地,步骤104包括:获取所述预设滑动操作的滑动方向;当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;当所述滑动方向朝向所述目标行的行尾时,将所述光标定位到所述目标行的行尾;当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。即本公开的实施例,可利用滑动操作的滑动方向将光标定位到行首、行尾、列首或列尾。Optionally, step 104 includes: acquiring a sliding direction of the preset sliding operation; and positioning the cursor to a beginning of the target line when the sliding direction is toward a line head of the target line; When the sliding direction is toward the end of the line of the target line, the cursor is positioned to the end of the line of the target line; when the sliding direction is toward the beginning of the column of the target column, the cursor is positioned to the a column head of the target column; when the sliding direction is toward the end of the column of the target column, the cursor is positioned to the end of the column of the target column. That is, in the embodiment of the present disclosure, the cursor can be positioned to the beginning of the line, the end of the line, the beginning of the column, or the end of the column by using the sliding direction of the sliding operation.
综上所述,在需要将光标定位到目标行的行首时,用户可以重击目标行上的任意位置,然后向行首方向(即向左)快速滑动,并控制手指与触摸屏的接触力度逐渐减轻,直至离开触摸屏,从而使得移动终端将光标定位到目标行的行首。 In summary, when the cursor needs to be positioned at the beginning of the target line, the user can hit any position on the target line, then quickly slide to the first direction of the line (ie, to the left), and control the contact force between the finger and the touch screen. Gradually lighten until leaving the touch screen, causing the mobile terminal to position the cursor at the beginning of the target line.
在需要将光标定位到目标行的行尾时,用户可以重击目标行上的任意位置,然后向行尾方向(即向右)快速滑动,并控制手指与触摸屏的接触力度逐渐减轻,直至离开触摸屏,从而使得移动终端将光标定位到目标行的行尾。When the cursor needs to be positioned at the end of the line of the target line, the user can hit any position on the target line, then swipe to the end of the line (ie, to the right), and control the contact force of the finger with the touch screen to gradually reduce until it leaves. The touch screen causes the mobile terminal to position the cursor at the end of the line of the target line.
在需要将光标定位到目标列的列首时,用户可以重击目标列上的任意位置,然后向列首方向(即向上)快速滑动,并控制手指与触摸屏的接触力度逐渐减轻,直至离开触摸屏,从而使得移动终端将光标定位到目标列的列首。When you need to position the cursor at the top of the target column, the user can click anywhere on the target column, then quickly slide in the first direction of the column (ie, up), and control the contact between the finger and the touch screen to gradually reduce until the touch screen is left. So that the mobile terminal positions the cursor to the top of the target column.
在需要将光标定位到目标列的列尾时,用户可以重击目标列上的任意位置,然后向列尾方向(即向下)快速滑动,并控制手指与触摸屏的接触力度逐渐减轻,直至离开触摸屏,从而使得移动终端将光标定位到目标列的列尾。When the cursor needs to be positioned at the end of the column of the target column, the user can click anywhere on the target column, then swipe toward the end of the column (ie, down), and control the contact between the finger and the touch screen to gradually reduce until it leaves. The touch screen causes the mobile terminal to position the cursor at the end of the column of the target column.
此外,为了简化用户的操作步骤,降低用户操作的手势复杂度,从而加快对光标的定位,可只利用预设点击操作完成对光标的定位。可选地,根据预设点击操作的点击位置与文字编辑区域的边界的距离,对光标进行定位。那么,在上述步骤103中若未检测到预设滑动操作时,可根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。In addition, in order to simplify the operation steps of the user, reduce the complexity of the gesture of the user operation, and speed up the positioning of the cursor, the positioning of the cursor can be completed only by the preset click operation. Optionally, the cursor is positioned according to the distance between the click position of the preset click operation and the boundary of the text editing area. Then, if the preset sliding operation is not detected in the above step 103, the cursor may be positioned to the beginning of the target line or the target line according to the distance from the click position to the boundary of the text editing area. The end of the line or the beginning of the column of the target column or the end of the column of the target column.
此时,所述文字编辑区域可以为由左边界、右边界、上边界和下边界构成的矩形区域,上述根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾,可包括:当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;当所述点击位置到所述右边界的距离位于第二预设范围之内时,将所述光标定位到所述目标行的行尾;当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述光标定位到所述目标列的列尾。In this case, the text editing area may be a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary, and the cursor is positioned to the cursor according to the distance from the click position to the boundary of the text editing area. The beginning of the line of the target line or the end of the line of the target line or the end of the column of the target column or the end of the target column may include: when the distance from the click position to the left boundary is at the first preset Positioning the cursor to the beginning of the target line; positioning the cursor to the target when the distance from the click position to the right boundary is within a second predetermined range a line ending of a line; when the distance from the click position to the upper boundary is within a third predetermined range, positioning the cursor to a column head of the target column; when the click position is to the bottom When the distance of the boundary is within the fourth predetermined range, the cursor is positioned to the end of the column of the target column.
其中,所述第一预设范围、所述第二预设范围、所述第三预设范围、所述第四预设范围,这四个预设范围之间可以相同,也可以不同。The first preset range, the second preset range, the third preset range, and the fourth preset range may be the same or different.
即,如果需要定位光标到较长行的行尾,可重击该行靠近右边界的位置,然后可自动将光标定位到行尾;如果需要定位光标到较长行的行首,可重击该行靠近左边界的位置,然后可自动将光标定位到行首;如果需要定位光标到较长列的列首,可重击该列靠近上边界的位置,然后可自动将光标定位到 列首;如果需要定位光标到较长列的列尾,可重击该列靠近下边界的位置,然后可自动将光标定位到列尾。That is, if you need to position the cursor to the end of the longer line, you can click the position of the line near the right border, and then automatically position the cursor to the end of the line; if you need to position the cursor to the beginning of the longer line, you can hit it again. The line is close to the left border, and then the cursor is automatically positioned to the beginning of the line; if you need to position the cursor to the top of the longer column, you can click the position of the column near the upper boundary, and then automatically position the cursor If you need to position the cursor to the end of the column of the longer column, you can click the position of the column near the lower boundary and then automatically position the cursor to the end of the column.
由上述可知,本公开的实施例,在移动终端的文字编辑区域内检测到预设点击操作时,获取点击位置所在的目标行和目标列,然后在检测到预设滑动操作时,根据滑动操作将光标定位到目标行的行首或目标行的行尾或目标列的列首或目标列的列尾,从而避免移动终端触摸屏的边缘不灵敏造成的光标定位困难,并且通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,操作简单方便,提升了用户的使用体验。It can be seen from the above that, when the preset click operation is detected in the text editing area of the mobile terminal, the target row and the target column where the click location is located are obtained, and then, when the preset sliding operation is detected, according to the sliding operation Position the cursor at the beginning of the line of the target line or the end of the target line or the end of the column of the target column, so as to avoid the cursor positioning caused by the insensitivity of the touch screen of the mobile terminal, and the user clicks through the preset The operation and preset sliding operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient, thereby improving the user experience.
本公开实施例还提供了一种移动终端的光标定位装置,如图2所示,该装置200包括:The embodiment of the present disclosure further provides a cursor positioning device for a mobile terminal. As shown in FIG. 2, the device 200 includes:
第一判断模块201,设置为:判断在移动终端的文字编辑区域内是否检测到预设点击操作;The first determining module 201 is configured to: determine whether a preset click operation is detected in a text editing area of the mobile terminal;
获取模块202,设置为:当所述第一判断模块201判断检测到所述预设点击操作时,获取所述预设点击操作的点击位置所在的目标行和目标列;The obtaining module 202 is configured to: when the first determining module 201 determines that the preset click operation is detected, obtain a target row and a target column where the click location of the preset click operation is located;
第二判断模块203,设置为:判断在所述移动终端的触摸屏上是否检测到预设滑动操作;The second determining module 203 is configured to: determine whether a preset sliding operation is detected on the touch screen of the mobile terminal;
第一定位模块204,设置为:当所述第二判断模块203判断检测到所述预设滑动操作时,根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。The first positioning module 204 is configured to: when the second determining module 203 determines that the preset sliding operation is detected, according to the preset sliding operation, position the cursor to the beginning of the target line or the The end of the row of the target row or the beginning of the column of the target column or the end of the column of the target column.
可选地,如图3所示,所述装置还包括:Optionally, as shown in FIG. 3, the apparatus further includes:
第二定位模块205,设置为:当所述第二判断模块203判断未检测到所述预设滑动操作时,根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。The second positioning module 205 is configured to: when the second determining module 203 determines that the preset sliding operation is not detected, locate the cursor according to the distance from the click position to the boundary of the text editing area The beginning of the line of the target line or the end of the line of the target line or the beginning of the column of the target column or the end of the column of the target column.
可选地,如图3所示,所述第一定位模块204包括:Optionally, as shown in FIG. 3, the first positioning module 204 includes:
方向确定单元2041,设置为:获取所述预设滑动操作的滑动方向;The direction determining unit 2041 is configured to: obtain a sliding direction of the preset sliding operation;
第一定位单元2042,设置为:当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;The first positioning unit 2042 is configured to: when the sliding direction is toward a line head of the target line, positioning the cursor to a line head of the target line;
第二定位单元2043,设置为:当所述滑动方向朝向所述目标行的行尾时, 将所述光标定位到所述目标行的行尾;The second positioning unit 2043 is configured to: when the sliding direction is toward the end of the target line, Positioning the cursor at the end of the line of the target line;
第三定位单元2044,设置为:当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;The third positioning unit 2044 is configured to: when the sliding direction is toward a column head of the target column, positioning the cursor to a column head of the target column;
第四定位单元2045,设置为:当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。The fourth positioning unit 2045 is configured to position the cursor to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
可选地,所述文字编辑区域为由左边界、右边界、上边界和下边界构成的矩形区域;所述第二定位模块205包括:Optionally, the text editing area is a rectangular area formed by a left boundary, a right boundary, an upper boundary, and a lower boundary; the second positioning module 205 includes:
第五定位单元2051,设置为:当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;The fifth positioning unit 2051 is configured to: when the distance from the click position to the left boundary is within the first preset range, locate the cursor to the beginning of the target line;
第六定位单元2052,设置为:当所述点击位置到所述右边界的距离位于第二预设范围之内时,将所述光标定位到所述目标行的行尾;The sixth positioning unit 2052 is configured to: when the distance from the click position to the right boundary is within the second preset range, position the cursor to the end of the target line;
第七定位单元2053,设置为:当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;The seventh positioning unit 2053 is configured to: when the distance from the click position to the upper boundary is within a third preset range, positioning the cursor to a column head of the target column;
第八定位单元2054,设置为:当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述光标定位到所述目标列的列尾。The eighth positioning unit 2054 is configured to: when the distance from the click position to the lower boundary is within a fourth preset range, position the cursor to the end of the column of the target column.
可选地,如图3所示,所述第一判断模块201包括:Optionally, as shown in FIG. 3, the first determining module 201 includes:
压力获取单元2011,设置为:获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值;The pressure acquisition unit 2011 is configured to: acquire a pressure value at a click position of the click operation detected in the text editing area of the mobile terminal;
第一确定单元2012,设置为:当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。The first determining unit 2012 is configured to: when the pressure value at the click position exceeds a preset threshold, determine that the preset click operation is detected.
可选地,如图3所示,所述第二判断模块203包括:Optionally, as shown in FIG. 3, the second determining module 203 includes:
判断单元2031,设置为:判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;The determining unit 2031 is configured to: determine whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased;
第二确定单元2032,设置为:若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。The second determining unit 2032 is configured to determine that the preset sliding operation is detected if the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases.
可选地,如图3所示,判断单元2031包括:Optionally, as shown in FIG. 3, the determining unit 2031 includes:
采样子单元20311,设置为:每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值; The sampling sub-unit 20311 is configured to: at every preset distance, determine a sampling point on the sliding track of the detected sliding operation, and collect the pressure value at the sampling point and the operation object at the sampling point Speed value
第一判断子单元20312,设置为:判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;The first determining subunit 20312 is configured to: determine whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collecting;
第二判断子单元20313,设置为:判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。The second judging subunit 20313 is configured to: determine whether the speed values of the operation object at the plurality of sampling points are gradually increased according to the time sequence of the collection.
本公开的实施例,通过第一判断模块201判断在移动终端的文字编辑区域内是否检测到预设点击操作,并在检测到所述预设点击操作时,触发获取模块202获取所述预设点击操作的点击位置所在的目标行和目标列,从而通过第二判断模块203判断在所述移动终端的触摸屏上是否检测到预设滑动操作,并在检测到所述预设滑动操作时,触发第一定位模块204根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾,从而避免移动终端触摸屏的边缘不灵敏造成的光标定位困难,并且通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,操作简单方便。In the embodiment of the present disclosure, it is determined by the first determining module 201 whether a preset click operation is detected in the text editing area of the mobile terminal, and when the preset click operation is detected, the trigger obtaining module 202 acquires the preset. Clicking the target row and the target column where the click position of the operation is located, so that the second judging module 203 determines whether a preset sliding operation is detected on the touch screen of the mobile terminal, and triggers when the preset sliding operation is detected. The first positioning module 204 positions the cursor to the beginning of the line of the target line or the end of the target row or the column header of the target column or the end of the target column according to the preset sliding operation, thereby It is difficult to avoid cursor positioning caused by the insensitivity of the edge of the touch screen of the mobile terminal, and the cursor can be quickly positioned to the beginning, end of the column, column head, and column end by the user's preset click operation and preset sliding operation, and does not occupy the input. The space of the keyboard is simple and convenient to operate.
本公开的实施例还提供了一种移动终端,包括上述所述的移动终端的光标定位装置。因此,本公开实施例的移动终端,能够在移动终端的文字编辑区域内检测到预设点击操作时,获取点击位置所在的目标行和目标列,然后在检测到预设滑动操作时,根据滑动操作将光标定位到目标行的行首或目标行的行尾或目标列的列首或目标列的列尾,从而避免移动终端触摸屏的边缘不灵敏造成的光标定位困难,并且通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,操作简单方便,提升了产品的市场竞争力。Embodiments of the present disclosure also provide a mobile terminal, including the cursor positioning device of the mobile terminal described above. Therefore, the mobile terminal of the embodiment of the present disclosure can acquire the target row and the target column where the click location is located when the preset click operation is detected in the text editing area of the mobile terminal, and then, when the preset sliding operation is detected, according to the sliding The operation locates the cursor at the beginning of the line of the target line or the end of the target line or the end of the column of the target column or the end of the target column, thereby avoiding the difficulty of cursor positioning caused by the insensitivity of the edge of the touch screen of the mobile terminal, and through the user's preset Click operation and preset sliding operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient, which improves the market competitiveness of the product.
本公开实施例还提供了一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令被执行时实现上述移动终端的光标定位方法。The embodiment of the present disclosure further provides a computer readable storage medium storing computer executable instructions that implement the cursor positioning method of the mobile terminal when the computer executable instructions are executed.
本领域普通技术人员可以理解上述实施例的全部或部分步骤可以使用计算机程序流程来实现,所述计算机程序可以存储于一计算机可读存储介质中,所述计算机程序在相应的硬件平台上(如系统、设备、装置、器件、处理器等)执行,在执行时,包括方法实施例的步骤之一或其组合。One of ordinary skill in the art will appreciate that all or a portion of the steps of the above-described embodiments can be implemented using a computer program flow, which can be stored in a computer readable storage medium, such as on a corresponding hardware platform (eg, The system, device, device, device, processor, etc. are executed, and when executed, include one or a combination of the steps of the method embodiments.
可选地,上述实施例的全部或部分步骤也可以使用集成电路来实现,这些步骤可以被分别制作成一个个集成电路模块,或者将它们中的多个模块或 步骤制作成单个集成电路模块来实现。Optionally, all or part of the steps of the foregoing embodiments may also be implemented by using an integrated circuit, and the steps may be separately fabricated into integrated circuit modules, or multiple modules thereof or The steps are made into a single integrated circuit module.
上述实施例中的装置/功能模块/功能单元可以采用通用的计算装置来实现,它们可以集中在单个的计算装置上,也可以分布在多个计算装置所组成的网络上。The devices/function modules/functional units in the above embodiments may be implemented by a general-purpose computing device, which may be centralized on a single computing device or distributed over a network of multiple computing devices.
上述实施例中的装置/功能模块/功能单元以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。上述提到的计算机可读取存储介质可以是只读存储器,磁盘或光盘等。When the device/function module/functional unit in the above embodiment is implemented in the form of a software function module and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. The above mentioned computer readable storage medium may be a read only memory, a magnetic disk or an optical disk or the like.
本领域的普通技术人员可以理解,可以对本申请的技术方案进行修改或者等同替换,而不脱离本申请技术方案的精神和范围。本申请的保护范围以权利要求所定义的范围为准。A person skilled in the art can understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application. The scope of protection of this application is defined by the scope defined by the claims.
工业实用性Industrial applicability
本公开的实施例,在移动终端的文字编辑区域内检测到预设点击操作时,获取点击位置所在的目标行和目标列,在检测到预设滑动操作时,根据滑动操作将光标定位到目标行的行首或目标行的行尾或目标列的列首或目标列的列尾,从而避免移动终端触摸屏的边缘不灵敏造成的光标定位困难,并且通过用户的预设点击操作和预设滑动操作就能够将光标快速定位到行首、行尾、列首、列尾,不会占据输入法键盘的空间,操作简单方便。 In the embodiment of the present disclosure, when a preset click operation is detected in the text editing area of the mobile terminal, the target row and the target column where the click location is located are acquired, and when the preset sliding operation is detected, the cursor is positioned to the target according to the sliding operation. The end of the line or the end of the target line or the end of the column of the target column, thereby avoiding the cursor positioning caused by the insensitivity of the touch screen edge of the mobile terminal, and sliding by the user's preset click operation and preset The operation can quickly position the cursor to the beginning of the line, the end of the line, the beginning of the column, and the end of the column. It does not occupy the space of the input method keyboard, and the operation is simple and convenient.

Claims (15)

  1. 一种移动终端的光标定位方法,包括:A cursor positioning method for a mobile terminal, comprising:
    判断在移动终端的文字编辑区域内是否检测到预设点击操作;Determining whether a preset click operation is detected in a text editing area of the mobile terminal;
    若检测到所述预设点击操作,则获取所述预设点击操作的点击位置所在的目标行和目标列;If the preset click operation is detected, acquiring a target row and a target column where the click location of the preset click operation is located;
    判断在所述移动终端的触摸屏上是否检测到预设滑动操作;Determining whether a preset sliding operation is detected on the touch screen of the mobile terminal;
    若检测到所述预设滑动操作,则根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。If the preset sliding operation is detected, positioning the cursor to the beginning of the target line or the end of the target line or the first or the target of the target column according to the preset sliding operation The end of the column.
  2. 根据权利要求1所述的方法,所述方法还包括:The method of claim 1 further comprising:
    若未检测到所述预设滑动操作,则根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。If the preset sliding operation is not detected, positioning the cursor to the beginning of the target line or the end of the target line or the end according to the distance from the click position to the boundary of the text editing area The beginning of the column of the target column or the end of the column of the target column.
  3. 根据权利要求1所述的方法,其中,所述根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾,包括:The method of claim 1, wherein the cursor is positioned to a beginning of a line of the target line or a line ending of the target line or a column head of the target column according to the preset sliding operation The end of the column of the target column, including:
    获取所述预设滑动操作的滑动方向;Obtaining a sliding direction of the preset sliding operation;
    当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;When the sliding direction is toward the beginning of the target line, positioning the cursor to the beginning of the target line;
    当所述滑动方向朝向所述目标行的行尾时,将所述光标定位到所述目标行的行尾;When the sliding direction is toward the end of the line of the target line, the cursor is positioned to the end of the line of the target line;
    当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;When the sliding direction is toward the column head of the target column, positioning the cursor to the column head of the target column;
    当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。The cursor is positioned to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
  4. 根据权利要求2所述的方法,其中,所述文字编辑区域为由左边界、右边界、上边界和下边界构成的矩形区域;The method according to claim 2, wherein said text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
    所述根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列 的列尾,包括:And positioning the cursor to the beginning of the target row or the end of the target row or the column header or the target column of the target column according to the distance from the click position to the boundary of the text editing area The end of the column, including:
    当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;When the distance from the click position to the left boundary is within a first preset range, positioning the cursor to the beginning of the target line;
    当所述点击位置到所述右边界的距离位于第二预设范围之内时,将所述光标定位到所述目标行的行尾;When the distance from the click position to the right border is within a second preset range, the cursor is positioned to the end of the target line;
    当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;And positioning the cursor to the column head of the target column when the distance from the click position to the upper boundary is within a third preset range;
    当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述光标定位到所述目标列的列尾。When the distance from the click position to the lower boundary is within a fourth predetermined range, the cursor is positioned to the end of the column of the target column.
  5. 根据权利要求1所述的方法,其中,所述判断在移动终端的文字编辑区域内是否检测到预设点击操作的步骤,包括:The method of claim 1, wherein the step of determining whether a preset click operation is detected in a text editing area of the mobile terminal comprises:
    获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值;Obtaining a pressure value at a click position of a click operation detected in a text editing area of the mobile terminal;
    当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。When the pressure value at the click position exceeds a preset threshold, it is determined that the preset click operation is detected.
  6. 根据权利要求1所述的方法,其中,所述判断在所述移动终端的触摸屏上是否检测到预设滑动操作的步骤,包括:The method of claim 1, wherein the step of determining whether a preset sliding operation is detected on the touch screen of the mobile terminal comprises:
    判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;Determining whether the pressure on the sliding trajectory of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operation object of the sliding operation is gradually increased;
    若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。If the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases, it is determined that the preset sliding operation is detected.
  7. 根据权利要求6所述的方法,其中,所述判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大的步骤,包括:The method according to claim 6, wherein said judging whether the pressure on the sliding trajectory of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operation object of the sliding operation is gradually The steps to increase include:
    每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值;Determining a sampling point on the sliding track of the detected sliding operation every preset distance, and collecting the pressure value at the sampling point and the speed value of the operating object at the sampling point;
    判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;Determining whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collection;
    判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。It is determined whether the speed values of the operation object at the plurality of sampling points are gradually increased in accordance with the time sequence of the acquisition.
  8. 一种移动终端的光标定位装置,包括: A cursor positioning device for a mobile terminal, comprising:
    第一判断模块,设置为:判断在移动终端的文字编辑区域内是否检测到预设点击操作;The first determining module is configured to: determine whether a preset click operation is detected in a text editing area of the mobile terminal;
    获取模块,设置为:当所述第一判断模块判断检测到所述预设点击操作时,获取所述预设点击操作的点击位置所在的目标行和目标列;The acquiring module is configured to: when the first determining module determines that the preset click operation is detected, obtain a target row and a target column where the click position of the preset click operation is located;
    第二判断模块,设置为:判断在所述移动终端的触摸屏上是否检测到预设滑动操作;The second determining module is configured to: determine whether a preset sliding operation is detected on the touch screen of the mobile terminal;
    第一定位模块,设置为:当所述第二判断模块判断检测到所述预设滑动操作时,根据所述预设滑动操作,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。a first positioning module, configured to: when the second determining module determines that the preset sliding operation is detected, according to the preset sliding operation, positioning a cursor to a line head or the target line of the target line The end of the line or the beginning of the column of the target column or the end of the column of the target column.
  9. 根据权利要求8所述的装置,所述装置还包括:The apparatus of claim 8 further comprising:
    第二定位模块,设置为:当所述第二判断模块判断未检测到所述预设滑动操作时,根据所述点击位置到所述文字编辑区域的边界的距离,将光标定位到所述目标行的行首或所述目标行的行尾或所述目标列的列首或所述目标列的列尾。a second positioning module, configured to: when the second determining module determines that the preset sliding operation is not detected, locate a cursor to the target according to a distance from the click position to a boundary of the text editing area The beginning of the line or the end of the line of the target line or the beginning of the column of the target column or the end of the column of the target column.
  10. 根据权利要求8所述的装置,其中,所述第一定位模块包括:The apparatus of claim 8, wherein the first positioning module comprises:
    方向确定单元,设置为:获取所述预设滑动操作的滑动方向;The direction determining unit is configured to: obtain a sliding direction of the preset sliding operation;
    第一定位单元,设置为:当所述滑动方向朝向所述目标行的行首时,将所述光标定位到所述目标行的行首;a first positioning unit configured to: when the sliding direction is toward a line head of the target line, positioning the cursor to a line head of the target line;
    第二定位单元,设置为:当所述滑动方向朝向所述目标行的行尾时,将所述光标定位到所述目标行的行尾;a second positioning unit configured to: when the sliding direction is toward a line ending of the target line, positioning the cursor to a tail of the target line;
    第三定位单元,设置为:当所述滑动方向朝向所述目标列的列首时,将所述光标定位到所述目标列的列首;a third positioning unit, configured to: when the sliding direction is toward a column head of the target column, positioning the cursor to a column head of the target column;
    第四定位单元,设置为:当所述滑动方向朝向所述目标列的列尾时,将所述光标定位到所述目标列的列尾。The fourth positioning unit is configured to position the cursor to the end of the column of the target column when the sliding direction is toward the end of the column of the target column.
  11. 根据权利要求9所述的装置,其中,所述文字编辑区域为由左边界、右边界、上边界和下边界构成的矩形区域;The apparatus according to claim 9, wherein said text editing area is a rectangular area composed of a left boundary, a right boundary, an upper boundary, and a lower boundary;
    所述第二定位模块包括:The second positioning module includes:
    第五定位单元,设置为:当所述点击位置到所述左边界的距离位于第一预设范围之内时,将所述光标定位到所述目标行的行首;a fifth positioning unit, configured to: when the distance from the click position to the left boundary is within a first preset range, positioning the cursor to a line head of the target line;
    第六定位单元,设置为:当所述点击位置到所述右边界的距离位于第二 预设范围之内时,将所述光标定位到所述目标行的行尾;a sixth positioning unit, configured to: when the click position to the right boundary is at a second distance Positioning the cursor to the end of the target line when the preset range is within;
    第七定位单元,设置为:当所述点击位置到所述上边界的距离位于第三预设范围之内时,将所述光标定位到所述目标列的列首;a seventh positioning unit, configured to: when the distance from the click position to the upper boundary is within a third preset range, positioning the cursor to a column head of the target column;
    第八定位单元,设置为:当所述点击位置到所述下边界的距离位于第四预设范围之内时,将所述光标定位到所述目标列的列尾。The eighth positioning unit is configured to: when the distance from the click position to the lower boundary is within a fourth preset range, position the cursor to the end of the column of the target column.
  12. 根据权利要求8所述的装置,其中,所述第一判断模块包括:The apparatus of claim 8, wherein the first determining module comprises:
    压力获取单元,设置为:获取在移动终端的文字编辑区域内检测到的点击操作的点击位置处的压力值;a pressure acquiring unit configured to: acquire a pressure value at a click position of a click operation detected in a text editing area of the mobile terminal;
    第一确定单元,设置为:当所述点击位置处的压力值超过预设阈值时,确定检测到所述预设点击操作。The first determining unit is configured to: when the pressure value at the click position exceeds a preset threshold, determine that the preset click operation is detected.
  13. 根据权利要求8所述的装置,其中,所述第二判断模块包括:The apparatus of claim 8, wherein the second determining module comprises:
    判断单元,设置为:判断在移动终端的触摸屏上检测到的滑动操作的滑动轨迹上的压力是否逐渐减小,以及检测到的滑动操作的操作对象的滑动速度是否逐渐增大;The determining unit is configured to: determine whether the pressure on the sliding track of the sliding operation detected on the touch screen of the mobile terminal is gradually decreased, and whether the sliding speed of the detected operating object of the sliding operation is gradually increased;
    第二确定单元,设置为:若所述滑动轨迹上的压力逐渐减小,且所述操作对象的滑动速度逐渐增大,则确定检测到所述预设滑动操作。The second determining unit is configured to determine that the preset sliding operation is detected if the pressure on the sliding track gradually decreases and the sliding speed of the operating object gradually increases.
  14. 根据权利要求13所述的装置,其中,判断单元包括:The apparatus according to claim 13, wherein the determining unit comprises:
    采样子单元,设置为:每隔预设距离,在检测到的滑动操作的滑动轨迹上确定一个采样点,并采集所述采样点处的压力值以及所述操作对象在所述采样点处的速度值;The sampling subunit is configured to: at every preset distance, determine a sampling point on the sliding track of the detected sliding operation, and collect the pressure value at the sampling point and the operation object at the sampling point Speed value
    第一判断子单元,设置为:判断多个采样点的压力值是否按照采集的时间顺序逐渐减小;The first determining subunit is configured to: determine whether the pressure values of the plurality of sampling points are gradually decreased according to the time sequence of the collecting;
    第二判断子单元,设置为:判断所述操作对象在多个采样点处的速度值是否按照采集的时间顺序逐渐增大。The second determining subunit is configured to: determine whether the speed value of the operation object at the plurality of sampling points is gradually increased according to the collected time sequence.
  15. 一种移动终端,包括如权利要求8至14中任意一项权利要求所述的移动终端的光标定位装置。 A mobile terminal comprising the cursor positioning device of the mobile terminal according to any one of claims 8 to 14.
PCT/CN2017/095400 2016-12-05 2017-08-01 Cursor positioning method and device for mobile terminal, and mobile terminal WO2018103352A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611102733.1 2016-12-05
CN201611102733.1A CN108153431A (en) 2016-12-05 2016-12-05 A kind of cursor positioning method of mobile terminal, device and mobile terminal

Publications (1)

Publication Number Publication Date
WO2018103352A1 true WO2018103352A1 (en) 2018-06-14

Family

ID=62470940

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/095400 WO2018103352A1 (en) 2016-12-05 2017-08-01 Cursor positioning method and device for mobile terminal, and mobile terminal

Country Status (2)

Country Link
CN (1) CN108153431A (en)
WO (1) WO2018103352A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116700521B (en) * 2023-06-02 2024-02-13 深圳联安通达科技有限公司 Touch screen self-adaptive touch detection method based on embedded operating system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799358A (en) * 2012-06-20 2012-11-28 中兴通讯股份有限公司 Method and device for determining display position of cursor
US20130342452A1 (en) * 2012-06-21 2013-12-26 Research In Motion Limited Electronic device including touch-sensitive display and method of controlling a position indicator
CN104317494A (en) * 2014-10-11 2015-01-28 广东欧珀移动通信有限公司 Method and system for moving cursor
CN105138256A (en) * 2015-07-08 2015-12-09 小米科技有限责任公司 Cursor positioning method and apparatus and terminal
CN105744062A (en) * 2016-01-29 2016-07-06 深圳天珑无线科技有限公司 Method and system for accurately positioning text cursor

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102799358A (en) * 2012-06-20 2012-11-28 中兴通讯股份有限公司 Method and device for determining display position of cursor
US20130342452A1 (en) * 2012-06-21 2013-12-26 Research In Motion Limited Electronic device including touch-sensitive display and method of controlling a position indicator
CN104317494A (en) * 2014-10-11 2015-01-28 广东欧珀移动通信有限公司 Method and system for moving cursor
CN105138256A (en) * 2015-07-08 2015-12-09 小米科技有限责任公司 Cursor positioning method and apparatus and terminal
CN105744062A (en) * 2016-01-29 2016-07-06 深圳天珑无线科技有限公司 Method and system for accurately positioning text cursor

Also Published As

Publication number Publication date
CN108153431A (en) 2018-06-12

Similar Documents

Publication Publication Date Title
US11042290B2 (en) Touch screen track recognition method and apparatus
US20140068518A1 (en) Method and device for switching application program of touch screen terminal
US20150077352A1 (en) Multi-Touch Virtual Mouse
CN106201166A (en) A kind of multi-screen display method and terminal
WO2014045953A1 (en) Information processing device and method, and program
WO2015131675A1 (en) Compensation method for broken slide paths, electronic device and computer storage medium
US20140071171A1 (en) Pinch-and-zoom, zoom-and-pinch gesture control
CN109918013A (en) Method and apparatus for the processing of touch screen hovering input
WO2017101331A1 (en) Information prompting method and apparatus, computer program and storage medium
US20160162149A1 (en) Mobile electronic device, method for displaying user interface, and recording medium thereof
WO2019223461A1 (en) Touch detection method and computer-readable storage medium
KR20160101605A (en) Gesture input processing method and electronic device supporting the same
WO2021203815A1 (en) Page operation method and apparatus, and terminal and storage medium
CN108235747A (en) Edge false-touch prevention method, touch control equipment and storage medium
WO2016095640A1 (en) Method for controlling mobile terminal, and mobile terminal
CN104881225A (en) Control method and device for adjusting bar
WO2015131590A1 (en) Method for controlling blank screen gesture processing and terminal
WO2022007544A1 (en) Device control method and apparatus, and storage medium and electronic device
CN103455262A (en) Pen-based interaction method and system based on mobile computing platform
CN105413171A (en) Game character moving control method and device
US10564812B2 (en) Information processing method and electronic device
US11409432B2 (en) Pen command for ink editing
WO2018103352A1 (en) Cursor positioning method and device for mobile terminal, and mobile terminal
CN105739810B (en) Mobile electronic device and user interface display method
CN106095081A (en) Man-machine interaction method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17878592

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17878592

Country of ref document: EP

Kind code of ref document: A1