CN101893959A - Method for implementing touch direction identification in linux kernel - Google Patents
Method for implementing touch direction identification in linux kernel Download PDFInfo
- Publication number
- CN101893959A CN101893959A CN 201010205723 CN201010205723A CN101893959A CN 101893959 A CN101893959 A CN 101893959A CN 201010205723 CN201010205723 CN 201010205723 CN 201010205723 A CN201010205723 A CN 201010205723A CN 101893959 A CN101893959 A CN 101893959A
- Authority
- CN
- China
- Prior art keywords
- touch
- layer
- touch direction
- coordinate
- linux kernel
- Prior art date
- Legal status (The legal status 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 status listed.)
- Granted
Links
Images
Landscapes
- Position Input By Displaying (AREA)
Abstract
The invention relates to a method for implementing touch direction identification in a linux kernel. The method is established on a system consisting of a driving layer of the linux kernel, an input core layer associated with the driving layer, and an event processing layer. The method highlights the touch direction identification effect in the linux kernel, and provides the touch direction in the kernel to an application in an event mode at the same time, so that the method can effectively improve the generality of the touch direction identification of a touch screen and the unitarity, accuracy and high efficiency of the system so as to improve the convenience of an upper application.
Description
Background technology
The present invention relates to the recognition methods of touch-screen touch direction among the linux in a kind of International Classification of Patents G06F3/00 field of computer technology, especially a kind of method that in the linux kernel, realizes the identification of touch-screen touch direction.
Technical field
Linux is to the processing of all input equipments in the prior art, encapsulate, employing is by Drive Layer, and the input subsystem that input core layer and event handling layer are formed unifies to handle and manage all incoming events, and upper layer application can get access to incoming event information easily.Its input subsystem to the support of touchscreen events comprise absolute coordinates, touch is pressed and incident is lifted in touch; and present application system is not only only used these incidents; in order to improve the user interactivity of touch-screen; utilize these simple incidents through regular meeting, realize specific instructions such as some touch gestures in application layer.That is to say,, all realize, increased the complicacy of application and development like this, do not possess unitarity in application layer to the direction of touch-screen, the identification of gesture.How in the linux input subsystem, to realize multi-direction identification that touches and the support that obtains the touch direction incident, especially in the linux kernel, realize the identification of touch direction (upper and lower, left and right), on touch is mutual, offer convenience for application layer.
Summary of the invention
The present invention aims to provide a kind of method that realizes the identification of touch-screen touch direction in the linux kernel, can be implemented in the identification of touch direction upper and lower, left and right in the linux kernel by this method, under the direction identification that realization touches in the linux input subsystem simultaneously and the prerequisite of touch direction incident touch direction mode with incident in kernel is offered application layer, for application layer is brought good reliability, accuracy and convenience on touch is mutual.
For this reason, the technical scheme that the present invention solves described problem is: a kind of method that realizes the identification of touch-screen touch direction in the linux kernel, described method is based upon in the system that is made of the Drive Layer of described linux kernel, the input core layer that is associated with described Drive Layer, event handling layer, and its method comprises step:
(1) the touch direction incident that in advance the described input core layer in the described linux input subsystem and described event handling layer is increased defines with the method for reseptance of incident and handles;
(2) in described Drive Layer the touch process is gathered, wherein comprise three point coordinate that touch starting point, touch the arbitrfary point in terminal point and the touch process at least, in order to realize the identification of touch direction;
(3) described Drive Layer to the touch direction incident according to step (1) in predefined linux incoming event encapsulate; The touch direction incident is sent to the input core layer of input subsystem by described Drive Layer;
(4) receive and handle by described event handling layer by described input core layer, finally offer the upper layer application layer;
Wherein, described input subsystem is made up of Drive Layer, input core layer and event handling layer.
And, described step (1), its coordinate of gathering is a record.
And, described step (1), the arbitrfary point coordinate in its described touch process is described touch process intermediate point coordinate.
And whether described record is effective coordinate, depends on that current coordinate exceeds the scope of last institute coordinate acquisition.
And three point coordinate of being gathered have the step of carrying out preferably and determine its touch direction from three point coordinate of being gathered.
Compared to existing technology, the good effect that the present invention has is: owing to given prominence to the identification that realizes touch direction in the linux kernel, simultaneously touch direction mode with incident in kernel is offered application, thereby the present invention can effectively improve versatility and unitarity, accuracy and the high efficiency of system and then the convenience of raising upper layer application of the identification of touch-screen touch direction.
Description of drawings
Fig. 1 is being illustrated in the linux kernel of the present invention relates to flow process that realizes the identification of touch-screen touch direction and the structural representation of linux kernel system;
Fig. 2 is to be the synoptic diagram of a record about the coordinate of being gathered in the flow process;
Fig. 3 is about preferred and determine the synoptic diagram of its touch direction to three point coordinate gathered in the flow process.
Embodiment
Referring to above all figure, the present invention relates to a kind of method that in the linux kernel, realizes the identification of touch-screen touch direction, this method is based upon in the system that is made of the Drive Layer of described linux kernel, the input core layer that is associated with described Drive Layer, event handling layer, and described method comprises step:
(1) the touch direction incident that in advance the described input core layer in the described linux input subsystem and described event handling layer is increased defines with the method for reseptance of incident and handles;
(2) in described Drive Layer the touch process is gathered, wherein comprise three point coordinate that touch starting point, touch the arbitrfary point in terminal point and the touch process at least, in order to realize the identification of touch direction;
(3) described Drive Layer to the touch direction incident according to step (1) in predefined linux incoming event encapsulate; The touch direction incident is sent to the input core layer of input subsystem by described Drive Layer;
(4) receive and handle by described event handling layer by described input core layer, finally offer the upper layer application layer.
And, described step (1), its coordinate of gathering is a record.
And, described step (1), the arbitrfary point coordinate that it is gathered in the touch process is described touch process intermediate point coordinate.
And whether described record is effective coordinate, depends on that current coordinate exceeds the scope of last institute coordinate acquisition.
And three point coordinate of being gathered have the step of carrying out preferably and determine its touch direction from three point coordinate of being gathered.
Specifically, only limit to the realization on the application layer, and this state of affairs certainly will increase the complicacy of application and development to the direction of touch-screen, the identification of gesture, and system's page or leaf is not possessed unitarity at of the prior art.The present invention is intended in the linux system kernel touch direction event information be encapsulated, thereby has improved the versatility and the convenience of system applies.
For example, see Fig. 1, realization touch-screen touch direction recognition methods in the linux kernel provided by the invention, be the touch process to be carried out the coordinate collection in the touch-screen Drive Layer of linux, have three point coordinate at least, comprise the arbitrfary point that touches in starting point, touch terminal point and the touch process, realize the identification of touch direction; Increase the definition and the processing of touch direction incident in advance in input core layer in the linux input subsystem and the event handling layer; The touch direction incident is encapsulated according to predefined linux incoming event in advance, the touch direction incident is sent to the input core layer of input subsystem, the input core layer offers upper layer application by the event handling layer again.The statement of this flow process is:
(1) in linux touch-screen Drive Layer, press (touch starting point) from touch and begin coordinate is gathered, lift (touch terminal point) end coordinate collection to touching;
(2) from the coordinate of being gathered, select 3 points (touch starting point, touch the arbitrfary point in terminal point, the touch process) coordinate at least, analyze changes in coordinates trend, carry out touch direction identification;
(3) increase event definition in input core layer in the linux input subsystem and the event handling layer to touch direction, in Drive Layer the touch direction incident is encapsulated according to predefined linux incoming event, the touch direction incident is sent to the input core layer of input subsystem;
(4) the event handling layer touch direction information that will obtain the core layer from input offers to use and uses, for application offers convenience.
For another example, and referring to accompanying drawing 2,3, the method that the present invention implemented has been emphasized in the touch process, the current coordinate of being gathered will exceed a coordinate certain limit, just be considered as effective coordinate, and give record, and after the touch process finishes, need to select at least three point coordinate, wherein 2 is origin coordinates and terminal point coordinate, can be the arbitrfary point in the touch process more in addition, in order to improve accuracy, adopt touch process intermediate point coordinate, and, go out changes in coordinates trend by system-computed according to selected three point coordinate relation, can carry out computing to coordinate by using simple plus and minus calculation here, determine touch direction, can improve the efficient of computing.
In sum, the present invention to touch-screen of the prior art without limits, as long as can realize single-point touches, its necessary technology means (or technology) are: in the linux Drive Layer touch process is carried out the coordinate collection, utilize the touch direction recognition methods of indication of the present invention to carry out the touch direction incident was discerned and increased to touch direction in the linux kernel definition and relevant treatment, the touch direction incident is sent to the input subsystem of linux kernel by Drive Layer.
Claims (6)
1. in the linux kernel, realize the method that the touch-screen touch direction is discerned for one kind, it is characterized in that, this method is based upon in the system that is made of the Drive Layer of described linux kernel, the input core layer that is associated with described Drive Layer, event handling layer, and described method comprises step:
(1) the touch direction incident that in advance the described input core layer in the described linux input subsystem and described event handling layer is increased defines with the method for reseptance of incident and handles;
(2) in described Drive Layer the touch process is gathered, wherein comprise three point coordinate that touch starting point, touch the arbitrfary point in terminal point and the touch process at least, in order to realize the identification of touch direction;
(3) described Drive Layer to the touch direction incident according to step (1) in predefined linux incoming event encapsulate; The touch direction incident is sent to the input core layer of input subsystem by described Drive Layer;
(4) receive and handle by described event handling layer by described input core layer, finally offer the upper layer application layer.
2. the method that realizes the identification of touch-screen touch direction in the linux kernel according to claim 1, described input subsystem is made up of Drive Layer, input core layer and event handling layer.
3. the method that realizes the identification of touch-screen touch direction in the linux kernel according to claim 1 is characterized in that, described step (1) the touch process is gathered, and its coordinate of gathering is a record.
4. the method that realizes the identification of touch-screen touch direction in the linux kernel according to claim 1 is characterized in that in the touch process of described step (1), its arbitrfary point coordinate of gathering is described touch process intermediate point coordinate.
5. the method that realizes the identification of touch-screen touch direction in the linux kernel according to claim 2 is characterized in that whether described record is effective coordinate, depends on that current coordinate exceeds the scope of last institute coordinate acquisition.
6. according to claim 1 or the 3 described methods that in the linux kernel, realize the identification of touch-screen touch direction, it is characterized in that, according to its three point coordinate of gathering of step (1), has the step of carrying out preferably and determine its touch direction from three point coordinate of being gathered.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102057237A CN101893959B (en) | 2010-06-22 | 2010-06-22 | Method for implementing touch direction identification in linux kernel |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN2010102057237A CN101893959B (en) | 2010-06-22 | 2010-06-22 | Method for implementing touch direction identification in linux kernel |
Publications (2)
Publication Number | Publication Date |
---|---|
CN101893959A true CN101893959A (en) | 2010-11-24 |
CN101893959B CN101893959B (en) | 2012-03-28 |
Family
ID=43103167
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN2010102057237A Expired - Fee Related CN101893959B (en) | 2010-06-22 | 2010-06-22 | Method for implementing touch direction identification in linux kernel |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN101893959B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102790918A (en) * | 2012-08-17 | 2012-11-21 | 中国科学院声学研究所 | Smart television and method for receiving remote controller input by smart television |
CN105827588A (en) * | 2015-12-23 | 2016-08-03 | 广东亿迅科技有限公司 | Network driver layer-based streaming media data distribution system |
CN106547667A (en) * | 2015-09-16 | 2017-03-29 | 比亚迪股份有限公司 | A kind of fault cues method and system of mobile terminal |
CN107728841A (en) * | 2017-10-17 | 2018-02-23 | 中国船舶重工集团公司第七0九研究所 | Multi-touch method and system based on acceptance of the bid kylin operating system |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673939A (en) * | 2004-03-25 | 2005-09-28 | 升达科技股份有限公司 | Inputtig method, control module and product with starting location and moving direction as definition |
CN101719046A (en) * | 2009-11-30 | 2010-06-02 | 广东威创视讯科技股份有限公司 | Multi-point touch-based image operation interaction system and multi-point touch-based image operation interaction method |
-
2010
- 2010-06-22 CN CN2010102057237A patent/CN101893959B/en not_active Expired - Fee Related
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1673939A (en) * | 2004-03-25 | 2005-09-28 | 升达科技股份有限公司 | Inputtig method, control module and product with starting location and moving direction as definition |
CN101719046A (en) * | 2009-11-30 | 2010-06-02 | 广东威创视讯科技股份有限公司 | Multi-point touch-based image operation interaction system and multi-point touch-based image operation interaction method |
Non-Patent Citations (1)
Title |
---|
《机电工程》 20090331 於琪建,张海峰 Linux输入子系统在触摸屏驱动上的实现 第32-34、101页 第26卷, 第3期 2 * |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102790918A (en) * | 2012-08-17 | 2012-11-21 | 中国科学院声学研究所 | Smart television and method for receiving remote controller input by smart television |
CN106547667A (en) * | 2015-09-16 | 2017-03-29 | 比亚迪股份有限公司 | A kind of fault cues method and system of mobile terminal |
CN105827588A (en) * | 2015-12-23 | 2016-08-03 | 广东亿迅科技有限公司 | Network driver layer-based streaming media data distribution system |
CN105827588B (en) * | 2015-12-23 | 2019-03-15 | 广东亿迅科技有限公司 | A kind of stream medium data dissemination system based on network driver layer |
CN107728841A (en) * | 2017-10-17 | 2018-02-23 | 中国船舶重工集团公司第七0九研究所 | Multi-touch method and system based on acceptance of the bid kylin operating system |
CN107728841B (en) * | 2017-10-17 | 2021-04-09 | 中国船舶重工集团公司第七0九研究所 | Multi-point touch method and system based on bid-winning kylin operating system |
Also Published As
Publication number | Publication date |
---|---|
CN101893959B (en) | 2012-03-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103294401B (en) | A kind of icon disposal route and device with the electronic equipment of touch-screen | |
CN104035677B (en) | The display methods and device of prompt message | |
CN102662462A (en) | Electronic device, gesture recognition method and gesture application method | |
CN1967458A (en) | Method for controlling a touch screen user interface and device thereof | |
CN101893959B (en) | Method for implementing touch direction identification in linux kernel | |
CN103092489A (en) | Touch screen device fingerprint gesture unlocking method | |
US9025878B2 (en) | Electronic apparatus and handwritten document processing method | |
CN102854982A (en) | Method for recognizing customized gesture tracks | |
CN103777875A (en) | Human-machine interaction method and device and electronic device thereof | |
CN103019426A (en) | Interacting method and interacting device in touch terminal | |
CN104991645A (en) | Cursor control method and apparatus | |
CN103713730A (en) | Mid-air gesture recognition method and device applied to intelligent terminal | |
CN109542272A (en) | Touch screen scanning method and device, electronic equipment and computer readable storage medium | |
CN103455262A (en) | Pen-based interaction method and system based on mobile computing platform | |
CN102662511A (en) | Method and terminal for carrying out control operation through touch screen | |
CN205091713U (en) | Finger print identifying mouse | |
CN102467237A (en) | Device and method for realizing mouse function by using non-contact gestures | |
CN103984478B (en) | Dynamic icon displaying method and system | |
CN102541358A (en) | 3D visual angle converting system and method for sliding click response | |
CN103823583A (en) | Method and device for processing multi-point touch information | |
WO2017067165A1 (en) | Method and apparatus for recognising multi-finger sliding gesture and terminal device | |
CN102855076B (en) | The control method of touch-screen and device, mobile terminal device | |
CN105373329A (en) | Interactive method and system for display and booth | |
CN102073415A (en) | Touch system, auxiliary device and input method thereof | |
CN104915132A (en) | Information processing method and equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20120328 Termination date: 20180622 |