WO2013123720A1 - 一种控制鼠标模块的方法及电子设备 - Google Patents

一种控制鼠标模块的方法及电子设备 Download PDF

Info

Publication number
WO2013123720A1
WO2013123720A1 PCT/CN2012/074916 CN2012074916W WO2013123720A1 WO 2013123720 A1 WO2013123720 A1 WO 2013123720A1 CN 2012074916 W CN2012074916 W CN 2012074916W WO 2013123720 A1 WO2013123720 A1 WO 2013123720A1
Authority
WO
WIPO (PCT)
Prior art keywords
mouse
module
function
electronic device
function module
Prior art date
Application number
PCT/CN2012/074916
Other languages
English (en)
French (fr)
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 青岛海信信芯科技有限公司
Priority to US13/979,376 priority Critical patent/US20140361991A1/en
Publication of WO2013123720A1 publication Critical patent/WO2013123720A1/zh

Links

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/03543Mice 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/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/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry

Definitions

  • the mouse is controlled on the television.
  • the commonly used method is an external wired or wireless mouse, an air mouse function on the remote controller, a gesture control mouse based on a 2D or a 3D camera, and the like.
  • the traditional mouse addition method is realized by writing the mouse function into the code of the TV system, that is, the mouse code is separately written into each scene module code, so it is processed by the underlying driver, for example, through the underlying driver.
  • the mouse event is processed into a standard linux mouse event and forwarded to the upper layer system to implement corresponding control.
  • Another method for example, is to convert the obtained key operation into coordinate information at the bottom layer of the system, and then draw the mouse according to the coordinate point.
  • any module that uses the mouse needs to be added in the code.
  • the unadded part cannot implement the mouse operation. For example, if you want to implement the mouse under the home page, you must add the mouse code to the code of the home page. As long as the source code of the mouse is not added to the code, there is no way to use the mouse.
  • the mouse code is written into each scene or application, so the mouse operation cannot be used for an application without adding a mouse code.
  • Summary of the invention The present invention provides a method and an electronic device for controlling a mouse module, which solves the problem that the solution for implementing the mouse operation in the prior art involves the bottom layer of the system, and the application without the mouse code can not operate with the mouse.
  • An aspect of the present invention provides a method for controlling a mouse module, which is applied to an electronic device loaded with an operating system, the electronic device including at least one first type of program function module and at least one second type of program function module.
  • the mouse module includes a mouse service module and a mouse function module corresponding to the mouse service module, the mouse service module belongs to the at least one first type of program function module; the first type of program function module is at a preset time a module that can run in the background of the operating system, the second type of program function module is a module that can respond to an operation when the application interface is displayed, and the method includes: obtaining a mouse function control instruction from the first application module The first application module belongs to the at least one second type of program function module; and the mouse module is controlled to be in an operating or off state based on the mouse function control instruction.
  • the electronic device which is loaded with an operating system
  • the electronic device includes at least one first type of program function module and at least one second type of program function module, wherein the first type of program function module is in advance
  • the second type of program function module is a module that can respond to the operation when the application interface is displayed
  • the electronic device further includes: a mouse module, including a mouse service module and a mouse function module corresponding to the mouse service module, the mouse service module belongs to the at least one first type of program function module; and the obtaining module is configured to obtain a mouse function control instruction from the first application module, where The first application module belongs to the at least one second type of program function module; and the control module is configured to control the mouse module based on the mouse function control instruction to enable the mouse function module to be in an operating or off state.
  • a further aspect of the present invention provides an electronic device, which is loaded with an operating system
  • the electronic device includes: a mouse module, including a mouse service module and a mouse function module corresponding to the mouse service module, where the mouse module is located a system layer of the operating system, and capable of running in the background of the operating system within a preset time period; a mouse motion recognition device installed on the electronic device, and recognizing a mouse action when the mouse function module is in a running state
  • the mouse service module sends a corresponding mouse event message to the operating system according to the mouse action.
  • An embodiment of the present invention constructs a mouse module into a mouse service, and writes a mouse function into the mouse service.
  • the application program issues a mouse function control instruction based on the mouse function. Controlling the command, controlling the mouse module, and causing the mouse function module to be in a running or off state, so the method in this embodiment can be implemented only in the application layer of the system, and does not need to involve the underlying layer of the system, and also does not require the function of the mouse.
  • the code is written in each application, and the mouse function can be used, so the implementation scheme is simple and the user experience is good.
  • the mouse action is captured when the mouse function is turned on, and then the mouse action is converted into
  • the system standard event message is used to simulate the mouse operation, that is, to use the original system standard events of the operating system, so it is not necessary to define the data structure and events by itself, or to memorize gestures or buttons, and the user can completely operate according to the mouse operation mode that the user is accustomed to. No need to re-learn, there is no memory burden, so it is simple and convenient to use.
  • FIG. 1 is a flowchart of a method for controlling a mouse module according to an embodiment of the present invention
  • FIG. 2 is a flow chart of a function module for operating or turning off a mouse in the first embodiment of the present invention
  • FIG. 3 is a flow chart of a function module for operating or turning off a mouse in a second embodiment of the present invention
  • FIG. 4 is a flow chart of a function module for operating or turning off a mouse in a third embodiment of the present invention.
  • FIG. 5 is a functional block diagram of an electronic device according to an embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE INVENTION A first embodiment of the present invention provides a method of controlling a mouse module, the method being applied to an electronic device, such as a television, a mobile phone, or a tablet computer.
  • the electronic device is loaded with an operating system, such as an Android system, a Symbian system, the electronic device includes at least one first type of program function module and at least one second type of program function module, wherein the mouse module includes a mouse service module and a mouse service
  • the mouse function module corresponding to the module, the mouse module belongs to at least one first type of program function module;
  • the first type of program function module is a module that can run in the background of the operating system in a preset time period, generally located in the system layer of the operating system
  • the second type of program function module is a module that can respond to operations when the application interface is displayed. It is generally located at the application layer of the operating system and has a user interface, such as an application such as a browser. Please refer to FIG. 1.
  • FIG. 1 is a flowchart of a method for controlling a mouse module in the embodiment.
  • the method includes:
  • Step 101 Obtain a mouse function control instruction from the first application module, where the first application module belongs to at least one second type program function module;
  • Step 102 Control the mouse module based on the mouse function control instruction to make the mouse function module run or closed.
  • the electronic device takes a television as an example
  • the operating system uses an Android system as an example.
  • the mouse function module is formed, because the service can be kept running in the background for a defined period of time, so that the mouse function can be maintained.
  • the method for turning on or off the mouse function in this embodiment can be implemented only in the application layer of the system, and does not need to involve the underlying layer of the system.
  • the code of the mouse function is not required to be written in each application, and can be used. Mouse function, so the implementation scheme is simple and the user experience is good.
  • a mouse function control instruction may be sent, corresponding to step 101, a mouse function control instruction from the application may be obtained, and then step 102 is performed, that is, based on mouse function control An instruction that controls the mouse module to put the mouse function module in a running or off state.
  • the step of obtaining the mouse function control instruction from the first application module may be: receiving a call instruction from the first application module to call the mouse function module, and two specific examples are described below.
  • the custom call interface (API, application programming interface, application programming interface), system interface, third-party application Activity or other services to establish a mouse connection to the mouse service module to call service.
  • the Context.bindService() function is used to establish the connection
  • the Context.unbindService() function is used to close the connection.
  • an API function is defined in the source code of the mouse service module, and is disclosed in the form of a document or the like.
  • the system, third-party applications, and other service programs are defined as needing to combine the mouse functions during development, add corresponding code to the development source code of the system, third-party applications, and other service programs to establish or close the mouse service.
  • the connection, and the API defined before calling the mouse service after the connection is established. This approach requires the system, third-party applications, and other service programs to be aware of the API defined within the mouse service at the time of development, ie, the mouse API needs to be defined before other modules that use it. Please refer to Figure 3 for the flow chart of this method.
  • the mouse service module is opened after being called by the API function, and the startup and shutdown of the mouse service module and the startup and shutdown of the mouse function module are not separated, as a whole, the mouse service module is opened. , the mouse function is immediately available; when the mouse service module is turned off, the mouse function is immediately unavailable.
  • step 101 may specifically be: receiving a broadcast message from the first application module that controls the mouse function module.
  • the system interface, the activity of the third-party application or other services send a broadcast message when the mouse function is needed (the broadcast message has been customized in the mouse service module, and is provided as an API to the system interface, The application of the three-party application or other services are used).
  • the broadcast receiving module (broadcastReceiver) is also defined in the mouse service module, and the mouse function is received after receiving the broadcast message of "opening the mouse". It can be started, and the mouse function is turned off after receiving the broadcast message of "shut down the mouse".
  • the method is to define one or more strings as messages to be broadcast.
  • a code for receiving the broadcast message is added, and a corresponding operation is performed after receiving a broadcast message.
  • a segment code is responsible for receiving a broadcast message of "opening the mouse” and opening.
  • Mouse function module also has a code segment corresponding to "close the mouse” to close the mouse function module.
  • the mouse service module is always running, just to start and stop the mouse function through broadcast messages.
  • it can solve the problem that 2D or 3D gesture recognition conflicts with other video third party applications.
  • gesture recognition mouse usually needs to use the camera as a recognition device, when the camera needs to be used by a third party application, if the mouse function is When enabled, the third-party application issues a broadcast message that disables the mouse function, and then, when exiting the third-party application, issues a broadcast message that turns on the mouse function.
  • the first method is applicable to the system, the third-party application, and other services have been developed to add the mouse function
  • the second method is applicable to the system, the third-party application, and other services. Add mouse functionality when developing or preparing for development.
  • step 102 may specifically be: checking a flag bit based on a mouse function control instruction, the flag bit is used to indicate whether the mouse function module is set to be on; when the flag bit indicates that the mouse function module is enabled, the mouse is controlled Module that keeps the mouse function module running.
  • the user can set in advance whether the mouse function is turned on or not after booting. When the user sets the mouse function to ON, it can set a flag bit under the shared preference of /data/data/MousePackagename of the system. When the user sets the mouse function to off, the flag is cleared in the above path.
  • the mouse service module (if it is the first mode or the second mode, the mouse service module is another new mouse service module; if it is the third mode, the mouse service module can be The same mouse service module starts running. After receiving the broadcast message of BOOT COMPLETE, check the flag bit under the path. When this flag is set, the mouse function module is automatically started, otherwise the mouse function module is turned off. This embodiment can further improve the user experience.
  • the coordinate information of the mouse is transmitted to the operating system using the standard interface of the operating system.
  • the mouse service module can directly obtain the coordinate information of the mouse from the system by directly using the standard interface of the operating system.
  • the standard interface uses the interface function injectPointerEvent() provided by the "Window Manager Service” to transfer mouse events (including coordinate values and actions) to the current application's standard system listener function onTouchEvent().
  • the coordinate information of the mouse is, for example, an X/Y coordinate value adapted based on the resolution of the current display unit.
  • the mouse can be displayed on the display unit to simulate, for example, using a mouse on a computer, intuitively,
  • the image makes it easier to operate electronic devices.
  • it can be implemented as follows: In the mouse service module code, add the port import android.view.MotionEvent; import android. view.IwindowManager; import android.view.ViewManager; These are the standard classes of the Android system, belonging to the Android system Part of the source code.
  • the size of the display layer can be obtained by windowManager. getDefaultDisplay() . getWidth() and windowManager.getDefaultDisplay().getHeight().
  • These functions are the existing standard APIs for obtaining the resolution currently displayed by the display unit. .
  • the user can operate the electronic device by using the mouse operation mode that has been used for a long time.
  • the grab action and the hold grab action can complete a variety of operations: Quickly grab is to click the left mouse button, quickly grab Two times is to double-click the left mouse button. After grabbing, dragging is to drag and drop according to the left mouse button. If you hold it for a long time, you can click the right mouse button, and the mouse movement is operated by moving the user up, down, left, and right.
  • Use the "Window Manager Service" interface function injectionPointerEvent() to transfer mouse events (including coordinate values and actions) to the current application's standard system listener function onTouchEvent(). Please refer to Table 1, for the Android system.
  • the middle touch screen operates the mouse operation corresponding to the individual event.
  • Event message Android touch screen operation Simulate mouse operation
  • ACTION UP Raises on the screen Simulates the action of the mouse click and then lifts up. motionEvent.
  • ACTION MOVE Press to drag on the screen and drag by mouse button
  • the mouse service module when the currently applied standard system listening function onTouchEventO listens to the mouse action, the mouse service module sends a corresponding mouse event message to the operating system, refer to Table 2 for the mouse operation corresponding to the event combination:
  • the motionEvent.ACTION_DOW event message and the motionEvent.ACTIONJJP event message are sent to the system, because the click action is first pressed and then raised, so the event message is sent to the system.
  • the order is also the first motionEvent.ACTION_DOWN event message and then the motionEvent.ACTIONJJP event message.
  • the system After the system receives the event message, it recognizes the event message and knows what the mouse operation is. In this way, the mouse click operation can be completed.
  • the operation of dragging and double clicking is similar, and will not be described here.
  • the system can receive the user's operation information (that is, only after the motionEvent.ACTION_DOWN event message is sent, the motionEvent.
  • the ACTION_MOVE event message and the motionEvent.ACTIONJJP event message can be respectively recognized, so in the embodiment, when the mouse operation is only to move the mouse, it is equivalent to not performing any pressing action (ie, the user is not touched by the touch screen, Instead, it slides over the touch screen. Therefore, when you just move the mouse, you only need to draw the mouse on the display layer drawn with addView() according to the coordinates of the acquired mouse.
  • the operating system may also be a Windows system
  • the electronic device may not have a touch screen operation, as long as the mouse operation is converted into a standard system event message.
  • Mouse function can be implemented.
  • FIG. 5 is a functional block diagram of an electronic device according to the embodiment.
  • the electronic device includes: a mouse module 30, including a mouse service module 301 and a mouse service module
  • the mouse service module 301 belongs to the first type of program function module; the obtaining module 40 is configured to obtain the mouse function control instruction from the first application module, wherein the first application module belongs to the second category The program function module; the control module 50 is configured to control the mouse module 30 based on the mouse function control instruction to enable the mouse function module 302 to be in an operating or off state.
  • the obtaining module 40 is specifically configured to receive a calling instruction from the first application module to invoke the mouse function module.
  • the control module 50 is then specifically configured to control the mouse service module 301 to be in an active or closed state based on the call instruction.
  • the first mode and the second mode which are not described in detail here.
  • the obtaining module 40 is specifically configured to receive a broadcast message from the first application module that controls the mouse function module 302.
  • the control module 50 is then specifically configured to control the mouse function module 302 to be in an active or closed state based on the broadcast message.
  • the specific example please refer to the foregoing third mode, which will not be described in detail here.
  • control module 50 specifically includes: an checking unit, configured to check a flag based on a mouse function control instruction, where the flag is used to indicate whether the mouse function module 302 is set to be turned on; and the control unit is configured to be used
  • the flag bit indicates that when the mouse function module 302 is turned on, the mouse module 30 is controlled to make the mouse function module 302 in operation. Line status. If the flag is not set, the mouse module 30 is controlled to put the mouse function module 302 in the off state.
  • the electronic device further includes a display unit for displaying the operation object, and an acquisition module for acquiring coordinate information of the mouse on the display unit when the mouse function module 302 is in the running state, for example
  • the mouse function (including coordinate values and actions) is transmitted to the currently applied standard system listen function onTouchEvent() using the interface function injectPointerEvent() provided by the "Window Manager Service".
  • the coordinate information of the mouse is, for example, an X/Y coordinate value adapted based on the resolution of the current display unit.
  • the display unit further has a display layer on the screen
  • the electronic device further includes a display module for displaying the mouse at the position corresponding to the coordinate information of the display layer, for example, by using the addView() function in the ViewManager in the display unit. Add a display layer at the top of the screen to draw the mouse (or call the designed mouse image).
  • the electronic device further includes a capture module, configured to capture a mouse action when the mouse function module 302 is in the running state, and the mouse service module 301 sends a corresponding mouse event message to the operating system according to the mouse action, specifically, The mouse service module 301 transmits a corresponding mouse event message in an order consistent with the order in which the mouse actions occur.
  • a capture module configured to capture a mouse action when the mouse function module 302 is in the running state
  • the mouse service module 301 sends a corresponding mouse event message to the operating system according to the mouse action, specifically,
  • the mouse service module 301 transmits a corresponding mouse event message in an order consistent with the order in which the mouse actions occur.
  • an electronic device such as a smart TV, a smart phone, a tablet computer, etc.
  • the electronic device is loaded with an operating system
  • the electronic device includes: a mouse module, including a mouse service module and a mouse
  • the mouse function module corresponding to the service module, the mouse module is located at the system layer of the operating system, and can run in the background of the operating system within a preset time period; the mouse motion recognition device is installed on the electronic device, when the mouse function module is in the running state
  • the mouse service module sends a corresponding mouse event message to the operating system according to the mouse action.
  • the electronic device is a smart TV
  • the mouse module is as described in the foregoing embodiment
  • the operating system for example, an Android system
  • a mouse motion recognition device such as a 2D camera or a 3D camera
  • the electronic device may also include other functional modules such as speakers, control buttons and the like.
  • the smart TV further includes a display screen for displaying a picture, and a display layer on the screen, and the mouse can be displayed on the display layer.
  • the mouse motion recognition device that is, the camera recognizes that the user's gesture is a quick grab
  • the mouse service module sends a mouse event message of the left click to the operating system, and the operating system processes the mouse event message, and causes the display to be displayed.
  • the mouse on the layer makes the action of clicking the left mouse button; when the camera captures twice, it is double-clicking the left mouse button. After grabbing, dragging is to drag and drop by the left mouse button.
  • the mouse movement is operated by moving the user up, down, left, and right.
  • the smart TV in this embodiment has relatively independent operability, and enables the user to operate the smart TV completely without using a remote controller, using a mouse (including a normal mouse, an air mouse, a gesture recognition mouse, etc.).
  • An embodiment of the present invention constructs a mouse module into a mouse service, and writes a mouse function into the mouse service.
  • the application program issues a mouse function control instruction based on the mouse function. Controlling the command, controlling the mouse module, and causing the mouse function module to be in a running or off state, so the method in this embodiment can be implemented only in the application layer of the system, and does not need to involve the underlying layer of the system, and also does not require the function of the mouse.
  • the code is written in each application, and the mouse function can be used, so the implementation scheme is simple and the user experience is good.
  • the mouse action is captured when the mouse function is turned on, and then the mouse action is converted into a system standard event message to simulate the mouse operation, that is, the operating system original standard event is used, so the data structure does not need to be defined by itself. And events, or memory gestures or buttons, the user can completely operate according to the user's own mouse operation, no need to re-learn, there is no memory burden, so it is simple and convenient to use.
  • a display layer is added on the screen of the display unit, and a mouse is displayed on the display layer to simulate, for example, using a mouse on a computer, which is intuitive, image, and convenient for electronic devices. operating.
  • embodiments of the present invention can be provided as a method or computer program product.
  • the present invention can take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware.
  • the invention can take the form of a computer program product embodied on one or more computer-available storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

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)
  • Position Input By Displaying (AREA)

Abstract

本发明公开了一种控制鼠标模块的方法及电子设备。所述方法应用在一装载有操作系统的电子设备中,该电子设备包括至少一个第一类程序功能模块和至少一个第二类程序功能模块,其中,第一类程序功能模块为在预设时间段内能在操作系统后台运行的模块,第二类程序功能模块为在显示应用界面时才能响应操作的模块,鼠标模块包括鼠标服务模块及与鼠标服务模块对应的鼠标功能模块,鼠标服务模块属于至少一个第一类程序功能模块;所述方法包括:获得来自第一应用程序模块的鼠标功能控制指令,其中,第一应用程序模块属于至少一个第二类程序功能模块;基于鼠标功能控制指令,控制鼠标模块,使鼠标功能模块处于运行或关闭状态。

Description

一种控制鼠标模块的方法及电子设备
本申请要求在 2012年 2月 24日提交中国专利局、 申请号为 201210046342.8、 发明名 称为"一种控制鼠标模块的方法及电子设备 "的中国专利申请的优先权, 其全部内容通过 引用结合在本申请中。 技术领域 本发明涉及计算机技术领域, 尤其涉及一种控制鼠标模块的方法及电子设备。 背景技术 在现有的电子设备中, 例如电视机, 一般都是通过遥控器来进行控制, 但是对于设置 有触摸屏的电子设备而言, 例如触摸屏手机, 触摸屏电视机, 可使用手指对手机触屏进 行点击, 长按、 滑动等操作。 然而对于触摸屏电视机来说, 用户在操作时往往跟电视机 有一段距离, 使用触摸的方式显然非常不方便, 无法提供好的用户体验。
为了解决上述技术问题, 在电视机上采用鼠标的方式进行控制, 目前通常使用的方式 是外接有线或无线鼠标、 使用遥控器上的空中鼠标功能、 基于 2D或 3D摄像头的手势控 制鼠标等。 传统的鼠标添加方式, 是通过将鼠标功能写入电视机系统的代码中实现的, 即要将鼠标代码分别写入各个场景模块代码下, 所以要通过底层驱动程序进行处理, 例 如通过底层驱动程序将鼠标事件处理为标准的 linux鼠标事件并转发给上层系统实施相应 的控制, 再一种方法, 例如是在系统的底层, 将获取的按键操作转化为坐标信息后, 再 根据坐标点画出鼠标, 并自己定义数据结构和事件, 来判断按键的动作对应什么鼠标操 作。 因此, 但凡使用到鼠标的模块, 都需要在代码中进行添加, 未添加的部分不能实现 鼠标操作, 例如想要在主页下实现鼠标, 就必须将鼠标代码加进主页的代码中, 其他页 面下只要代码里没加鼠标部分的源码就没办法用鼠标操作。
在实现本发明过程中 , 发明人发现现有技术中至少存在如下问题:
第一: 现有技术的方法都需要系统底层的参与或者处理, 所以开发复杂, 周期长, 用 户体-险差;
第二: 现有技术中的方法要将鼠标代码写进各个场景或应用下, 所以对于没有添加鼠 标代码的应用就无法使用鼠标操作。 发明内容 本发明提供一种控制鼠标模块的方法及电子设备, 用以解决现有技术中实现鼠标操作 的方案存在的要涉及系统底层, 并且没有添加鼠标代码的应用就无法使用鼠标操作的问 题。
本发明一方面提供了一种控制鼠标模块的方法, 应用在一装载有操作系统的电子设备 中, 所述电子设备包括至少一个第一类程序功能模块和至少一个第二类程序功能模块, 所述鼠标模块包括鼠标服务模块及与所述鼠标服务模块对应的鼠标功能模块, 所述鼠标 服务模块属于所述至少一个第一类程序功能模块; 所述第一类程序功能模块为在预设时 间段内能在所述操作系统后台运行的模块, 所述第二类程序功能模块为在显示应用界面 时才能响应操作的模块 , 所述方法包括: 获得来自第一应用程序模块的鼠标功能控制指 令, 其中, 所述第一应用程序模块属于所述至少一个第二类程序功能模块; 基于所述鼠 标功能控制指令, 控制所述鼠标模块, 使所述鼠标功能模块处于运行或关闭状态。
本发明另一方面提供一种电子设备, 装载有一操作系统, 所述电子设备包括至少一个 第一类程序功能模块和至少一个第二类程序功能模块, 所述第一类程序功能模块为在预 设时间段内能在所述操作系统后台运行的模块, 所述第二类程序功能模块为在显示应用 界面时才能响应操作的模块, 所述电子设备还包括: 鼠标模块, 包括鼠标服务模块及与 所述鼠标服务模块对应的鼠标功能模块, 所述鼠标服务模块属于所述至少一个第一类程 序功能模块; 获得模块, 用于获得来自第一应用程序模块的鼠标功能控制指令, 其中, 所述第一应用程序模块属于所述至少一个第二类程序功能模块; 控制模块, 用于基于所 述鼠标功能控制指令, 控制所述鼠标模块, 使所述鼠标功能模块处于运行或关闭状态。
本发明再一方面还提供一种电子设备, 装载有一操作系统, 所述电子设备包括: 鼠标 模块, 包括鼠标服务模块及与所述鼠标服务模块对应的鼠标功能模块, 所述鼠标模块位 于所述操作系统的系统层, 且在预设时间段内能在所述操作系统的后台运行; 鼠标动作 识别装置, 安装于所述电子设备上, 当所述鼠标功能模块处于运行状态时, 识别鼠标动 作; 其中, 所述鼠标服务模块根据所述鼠标动作, 向所述操作系统发送对应的鼠标事件 消息。
本发明有益效果如下:
本发明一实施例将鼠标模块构建成鼠标服务, 将鼠标功能写入该鼠标服务中, 在应用 程序需要使用鼠标功能或不需要鼠标功能时, 只要应用程序发出鼠标功能控制指令, 基 于该鼠标功能控制指令, 控制鼠标模块, 使鼠标功能模块处于运行或关闭状态, 所以该 实施例中的方法只在系统的应用层即可实现, 并不需要涉及系统底层, 另外, 也不需要 将鼠标功能的代码写在各个应用程序中, 即可使用鼠标功能, 所以实现方案简单, 用户 体验好。
进一步, 本发明一实施例中在鼠标功能开启时捕捉鼠标动作, 然后将鼠标动作转化为 系统标准事件消息来模拟鼠标操作, 即利用操作系统原有的系统标准事件, 所以不需要 自己定义数据结构和事件, 或者记忆手势或者按键, 用户完全可以按照用户自己习惯的 鼠标操作方式进行操作, 无需重新学习, 不会有记忆负担, 所以使用起来简单方便的多。
更进一步, 本发明一实施例中, 在显示单元的屏幕上添加一显示屋, 将鼠标显示在该 显示层上, 以模拟例如在电脑上使用鼠标一样, 直观、 形象, 更方便对电子设备进行操 作。 附图说明 图 1为本发明一实施例中的控制鼠标模块的方法流程图;
图 2为本发明第一实施例中的运行或关闭鼠标功能模块的流程图;
图 3为本发明第二实施例中的运行或关闭鼠标功能模块的流程图;
图 4为本发明第三实施例中的运行或关闭鼠标功能模块的流程图;
图 5为本发明一实施例中的电子设备的功能框图。 具体实施方式 本发明第一实施例提供一种控制鼠标模块的方法, 该方法应用于一电子设备上, 该电 子设备例如为电视、 手机或平板电脑等。 该电子设备装载有一操作系统, 例如 Android 系统, 塞班系统, 该电子设备包括至少一个第一类程序功能模块和至少一个第二类程序 功能模块, 其中, 鼠标模块包括鼠标服务模块及与鼠标服务模块对应的鼠标功能模块, 鼠标模块属于至少一个第一类程序功能模块; 第一类程序功能模块为在预设时间段内能 在所述操作系统后台运行的模块, 一般位于操作系统的系统层, 没有可视化的用户界面, 例如服务, 第二类程序功能模块为在显示应用界面时才能响应操作的模块, 一般位于操 作系统的应用层, 且具有用户界面, 例如浏览器这样的应用程序。 请参考图 1 , 图 1为本 实施例中的控制鼠标模块的方法流程图。
如图 1所示, 该方法包括:
步骤 101 : 获得来自第一应用程序模块的鼠标功能控制指令, 其中, 第一应用程序模 块属于至少一个第二类程序功能模块;
步骤 102: 基于鼠标功能控制指令, 控制鼠标模块, 使鼠标功能模块处于运行或关闭 状态。
为了更详细的说明本发明, 下面举具体的实例来具体的说明, 其中电子设备以电视机 为例, 操作系统以 Android系统为例。
首先构建一个服务, 形成鼠标服务模块, 然后将鼠标功能实现的代码写在该鼠标服务 模块中, 形成鼠标功能模块, 因为服务能够在定义的一段时间内保持在后台运行, 如此 便可保持鼠标功能的有效性。 而且该实施例中的开启或关闭鼠标功能的方法只在系统的 应用层即可实现, 并不需要涉及系统底层, 另外, 也不需要将鼠标功能的代码写在各个 应用程序中, 即可使用鼠标功能, 所以实现方案简单, 用户体验好。
当某一应用程序想要使用鼠标功能时, 可发送一个鼠标功能控制指令, 对应的, 即为 步驟 101 , 可以获得来自该应用程序的鼠标功能控制指令, 然后执行步驟 102, 即基于鼠 标功能控制指令, 控制鼠标模块, 使鼠标功能模块处于运行或关闭状态。
其中, 在步骤 101中, 获得来自第一应用程序模块的鼠标功能控制指令具体可以为: 接收来自第一应用程序模块的调用鼠标功能模块的调用指令, 以下将举两个具体的实例 进行说明。
第一种, 通过在一个自定义的 Activity中调用 Context. startService()来启动鼠标服务模 块, 或调用 Context. stopService()来关闭鼠标服务模块, 该种方式是通过每次系统启动后, 再进入一个鼠标应用程序, 在应用程序中利用按钮、 选项框等控件打开和停止鼠标服务, 其中 Activity是 Android系统最基本的应用程序组件。 在应用程序中, 一个 Activity就是 一个单独的显示界面, 用于显示和与用户交互。 该种方式的流程图请参考图 2。
第二种, 在鼠标服务模块中自定义调用接口 ( API, application programming interface, 应用程序编程接口), 系统界面、 第三方应用的 Activity或其他的服务通过建立到鼠标服 务模块的连接, 来调用鼠标服务。 Context.bindService()函数用来建立连接, Context.unbindService()函数用来关闭连接。具体的说,是在鼠标服务模块的源代码里定义 了一个 API函数, 并以文档等形式对外公开。 当系统、 第三方应用程序、 其他的服务程 序在开发时被定义为需要结合鼠标功能, 则在系统、 第三方应用程序、 其他服务程序的 开发源码中加入相应的代码来建立或关闭与鼠标服务的连接, 并在建立连接后调用鼠标 服务之前定义好的 API。这种方式需要系统、第三方应用程序、其他的服务程序在开发的 时候就必须知道鼠标服务内定义的这个 API, 即, 鼠标 API需要在使用它的其他模块之 前定义。 该种方式的流程图请参考图 3。
在第一种方式和第二种方式中, 鼠标服务模块是被 API函数调用后才打开运行, 鼠标 服务模块的启动关闭和鼠标功能模块的启动关闭不用分开, 作为一个整体, 即打开鼠标 服务模块, 鼠标功能立即可用; 关闭鼠标服务模块, 鼠标功能立即不可用。
在另一实施例中, 步驟 101具体可以为: 接收来自所述第一应用程序模块的控制所述 鼠标功能模块的广播消息。 即第三种方式, 系统界面、 第三方应用的 Activity或其他的服 务在需要使用鼠标功能时, 发一个广播消息(该广播消息已在鼠标服务模块中自定义, 作为 API提供给系统界面、 第三方应用的 Activity或其他的服务使用)。 鼠标服务模块中 也定义了广播接收模块(broadcastReceiver ), 接收到 "打开鼠标" 的广播消息后将鼠标功 能启动, 接收到 "关闭鼠标" 的广播消息后将鼠标功能关闭。 详细的说, 该方式是定义 一个或多个字符串作为要广播出去的消息。 然后在鼠标服务模块里添加接收广播消息的 代码, 并定义接收到某条广播消息后执行相应的操作, 例如, 在鼠标服务模块中会有段 代码负责收到 "打开鼠标" 的广播消息而打开鼠标功能模块; 也有跟 "关闭鼠标" 相对 应的代码段来关闭鼠标功能模块。 而需要用到鼠标功能的系统界面、 第三方应用及其他 的服务, 则可以在需要的时候发出 "打开鼠标"、 "关闭鼠标" 的广播消息。 该种方式的 流程图请参考图 4。
在该种方式下, 鼠标服务模块一直在运行, 只是通过广播消息启动和关闭鼠标功能。 通过这种方式, 可以解决 2D或 3D手势识别与其他视频第三方应用使用摄像头冲突的问 题, 例如手势识别鼠标通常需要使用摄像头作为识别设备, 当摄像头需要被第三方应用 使用时, 如果鼠标功能是开启的, 则第三方应用发出一个关闭鼠标功能的广播消息, 再 在退出第三方应用时, 发出一个打开鼠标功能的广播消息即可。
在前述的三种方式中, 第一种方式适用于系统、 第三方应用、 其他服务已经完成开发 的情况下添加鼠标功能, 第二、 三种方式适用于在系统、 第三方应用、 其他服务正在开 发或准备开发的情况下添加鼠标功能。
在另一实施例中, 步驟 102具体可以为: 基于鼠标功能控制指令, 检查一标志位, 标 志位用于表示鼠标功能模块是否被设置为开启; 当标志位表示开启鼠标功能模块时, 控 制鼠标模块, 使鼠标功能模块处于运行状态。 详细的说, 是用户可以事先设置实现开机 后鼠标功能的开启与否。 当用户设置鼠标功能为开时, 可同时在系统的 /data/data/MousePackagename的 shared preference下设置一个标志位; 当用户设置鼠标功 能为关闭时, 在上述路径下清除该标志位。 当电视系统启动后, 鼠标服务模块(如果是 第一种方式或第二种方式, 则该鼠标服务模块是另外一个新的鼠标服务模块; 如果是第 三种方式, 则该鼠标服务模块可以是同一个鼠标服务模块)开始运行, 当接收到 BOOT COMPLETE的广播消息后, 检查该路径下的标志位。 当该标志位被设定, 则自动启动鼠 标功能模块, 否则保持鼠标功能模块关闭。 该实施例可进一步提高用户体验。
接下来介绍当鼠标功能模块处于运行状态时, 如何实现鼠标操作。
首先, 无论是手势识别鼠标、 空中鼠标还是普通鼠标, 都是会利用操作系统的标准接 口将鼠标的坐标信息传给操作系统。 鼠标服务模块则可直接利用操作系统的标准接口, 从系统中获得鼠标的坐标信息。在 Android系统中, 标准接口使用的是 "窗口管理服务" (Window Manager Service)提供的接口函数 injectPointerEvent()将鼠标事件(包括坐标值和 动作)传送给当前应用的标准系统监听函数 onTouchEvent()。 其中, 鼠标的坐标信息例如 是基于当前显示单元的分辨率适配过的 X/Y坐标值。
进一步,可在显示单元上将鼠标显示出来, 以模拟例如在电脑上使用鼠标一样,直观、 形象, 更方便对电子设备进行操作。 具体可按照如下方式实现: 在鼠标服务模块代码中, 添力口 import android.view.MotionEvent; import android. view.IwindowManager; import android.view.ViewManager; 这些是 Android系统的标准的类,属于 Android系统源码的一 部分。通过使用 ViewManager中的 addView()函数在显示单元的屏幕最上层添加一个显示 层将鼠标画出 (或调用设计好的鼠标图片 )。 其中, 显示层的大小, 可通过 windowManager. getDefaultDisplay() . getWidth() 和 windowManager.getDefaultDisplay().getHeight()来获得,这些函数为已有的标准 API, 用于 获取显示单元当前显示的分辨率。
接下来, 用户可利用早已习惯的鼠标操作方式操作电子设备, 例如在手势鼠标中, 利 用抓取动作和保持抓取动作就可以完成很多种操作: 快速抓一下就是单击鼠标左键, 快 速抓两下就是双击鼠标左键, 抓取后拖动就是按着鼠标左键拖拽, 长时间抓取不动就是 单击鼠标右键, 而鼠标移动则是通过用户上下左右移动手来操作。 利用 "窗口管理服务,, (Window Manager Service)提供的接口函数 injectPointerEvent()将鼠标事件(包括坐标值和 动作)传送给当前应用的标准系统监听函数 onTouchEvent()。 请参考表一, 为 Android系 统中触屏操作单独事件对应的鼠标操作。
事件消息 Android触屏操作 模拟鼠标操作
motionEvent. ACTION— DOWN 在屏幕上按下 模拟鼠标向下点击的动作
motionEvent. ACTION— UP 在屏幕上抬起 模拟鼠标点击后向上抬起的动作 motionEvent. ACTION— MOVE 按在屏幕上拖动模拟按着鼠标键拖动
表一
在本实施例中, 当当前应用的标准系统监听函数 onTouchEventO监听到鼠标动作时, 鼠标服务模块向操作系统发送对应鼠标事件消息, 请参考表二, 为事件组合对应的鼠标 操作:
模拟鼠标操作 按顺序发送的事件消息
单击 motionEvent. ACTION_DOW ,
motionEvent. ACTION UP
拖4 motionEvent. ACTION_DOW ,
motionEvent. ACTION— MO VE,
motionEvent. ACTION— UP
双击 motionEvent. ACTION_DOW ,
motionEvent. ACTION— UP,
motionEvent. ACTION— DO W ,
motionEvent. ACTION UP 表二
例如, 当鼠标的动作为单击的动作, 这时就向系统发送 motionEvent.ACTION_DOW 事件消息和 motionEvent.ACTIONJJP事件消息, 因为单击的动作是先按下, 再抬起, 所 以向系统发送事件消息的顺序也是先 motionEvent.ACTION_DOWN 事件消息再是 motionEvent.ACTIONJJP事件消息, 系统收到事件消息后, 识别出事件消息, 便可知道 鼠标操作是什么操作, 如此, 便可以完成鼠标单击操作了。 拖拽和双击的操作类似, 在 此不再赘述。
另外, 在 Android系统中, 只有用户接触到触摸屏, 即, 对屏幕做了按下动作, 系统 才能接收到用户的操作信息(也即, 只有在发送了 motionEvent.ACTION— DOWN事件消 息后, motionEvent.ACTION_MOVE事件消息和 motionEvent.ACTIONJJP事件消息才能 分别被识别, 所以在本实施例中, 当鼠标操作仅仅是移动鼠标时, 是相当于没有做任何 按下动作的 (即可认为用户没有接触触屏, 而是在触屏上方滑动)。 因此, 在仅仅移动鼠 标时时, 仅需根据获取到的鼠标的坐标值将鼠标画在利用 addView()画出来的显示层上即 可。
以上各实施例虽然是以 Android系统为例进行说明, 但是在其他实施例中, 操作系统 也可以是 Windows系统, 电子设备也可以不具备触屏操作, 只要将鼠标操作转换为标准 系统事件消息即可实现鼠标功能。
本发明另一实施例还提供了一种电子设备, 装载有一操作系统, 例如用于实现前述实 施例中的控制鼠标模块的方法。 请参考图 5, 图 5为本实施例电子设备的功能框图。
如图 5所示, 电子设备包括: 鼠标模块 30, 包括鼠标服务模块 301及与鼠标服务模块
301对应的鼠标功能模块 302,鼠标服务模块 301属于第一类程序功能模块;获得模块 40, 用于获得来自第一应用程序模块的鼠标功能控制指令, 其中, 第一应用程序模块属于第 二类程序功能模块; 控制模块 50, 用于基于鼠标功能控制指令, 控制鼠标模块 30, 使鼠 标功能模块 302处于运行或关闭状态。
其中, 获得模块 40具体用于接收来自第一应用程序模块的调用鼠标功能模块的调用 指令。 然后控制模块 50具体用于基于调用指令, 控制鼠标服务模块 301处于运行或关闭 状态。 具体实例请参见前述第一种方式和第二种方式, 在此不再详述。
在另一实施例中, 获得模块 40具体用于接收来自第一应用程序模块的控制鼠标功能 模块 302的广播消息。 然后控制模块 50具体用于基于广播消息, 控制鼠标功能模块 302 处于运行或关闭状态。 具体实例请参见前述第三种方式, 在此不再详述。
在另一实施例中, 控制模块 50具体包括: 检查单元, 用于基于鼠标功能控制指令, 检查一标志位, 标志位用于表示鼠标功能模块 302是否被设置为开启; 控制单元, 用于 当标志位表示开启鼠标功能模块 302时, 控制鼠标模块 30, 使鼠标功能模块 302处于运 行状态。 如果标志位没有被设置, 则控制鼠标模块 30, 使鼠标功能模块 302处于关闭状 态。
在另一实施例中,电子设备还包括显示单元和获取模块,显示单元用于显示操作对象, 获取模块用于当鼠标功能模块 302处于运行状态时, 获取鼠标在显示单元上的坐标信息, 例如在 Android系统中, 使用 "窗口管理服务" (Window Manager Service)提供的接口函 数 injectPointerEvent()将鼠标事件(包括坐标值和动作)传送给当前应用的标准系统监听 函数 onTouchEvent()。其中, 鼠标的坐标信息例如是基于当前显示单元的分辨率适配过的 X/Y坐标值。
进一步, 显示单元的屏幕上还具有一显示层, 电子设备还包括一显示模块, 用于将鼠 标显示在显示层对应坐标信息的位置上,例如通过使用 ViewManager中的 addView()函数 在显示单元的屏幕最上层添加一个显示层将鼠标画出 (或调用设计好的鼠标图片)。
在另一实施例中, 电子设备还包括捕捉模块, 用于当鼠标功能模块 302处于运行状态 时, 捕捉鼠标动作, 鼠标服务模块 301根据鼠标动作, 向操作系统发送对应鼠标事件消 息, 具体的, 鼠标服务模块 301按照与鼠标动作发生的顺序一致的顺序发送对应鼠标事 件消息。 具体实例请参考前述方法实施例中描述的操作过程, 在此不再详述。
以上各实施例可以单独实施, 也可以结合实施, 本领域技术人员可根据实际需要进行 选择。
本发明再一实施例中还提供一种电子设备,例如为智能电视,智能手机,平板电脑等, 该电子设备上装载有一操作系统, 该电子设备包括: 鼠标模块, 包括鼠标服务模块及与 鼠标服务模块对应的鼠标功能模块, 鼠标模块位于操作系统的系统层, 且在预设时间段 内能在操作系统的后台运行; 鼠标动作识别装置, 安装于电子设备上, 当鼠标功能模块 处于运行状态时, 识别鼠标动作; 其中, 鼠标服务模块根据鼠标动作, 向操作系统发送 对应的鼠标事件消息。
例如电子设备为智能电视, 鼠标模块如前述实施例中所介绍, 而操作系统, 例如为 Android系统, 鼠标动作识别装置, 例如为 2D摄像头或 3D摄像头, 可以识别手势鼠标。 当然, 电子设备还可以包括其他功能模块, 例如喇叭, 控制按钮等。
进一步, 智能电视还包括展幕, 用于显示画面, 在屏幕上还具有一显示层, 鼠标可显 示在该显示层上。
当鼠标动作识别装置, 即摄像头识别到用户的手势是快速的抓一下, 鼠标服务模块就 将单击左键的鼠标事件消息发送给操作系统, 操作系统处理该鼠标事件消息, 并使得显 示在显示层上的鼠标作出单击鼠标左键的动作; 当摄像头快速抓两下就是双击鼠标左键, 抓取后拖动就是按着鼠标左键拖拽, 长时间抓取不动就是单击鼠标右键, 而鼠标移动则 是通过用户上下左右移动手来操作。 本实施例中的智能电视具备了相对独立的操作性, 可使用户不依赖遥控器, 完全使用 鼠标(包括普通鼠标、 空中鼠标、 手势识别鼠标等)来操作智能电视。
本实施例中只介绍了电子设备的基本结构和鼠标操作, 对于本实施例中电子设备的具 体实现方式, 请参考前述描述控制鼠标模块的方法实施例, 在此不再详述。
本发明一实施例将鼠标模块构建成鼠标服务, 将鼠标功能写入该鼠标服务中, 在应用 程序需要使用鼠标功能或不需要鼠标功能时, 只要应用程序发出鼠标功能控制指令, 基 于该鼠标功能控制指令, 控制鼠标模块, 使鼠标功能模块处于运行或关闭状态, 所以该 实施例中的方法只在系统的应用层即可实现, 并不需要涉及系统底层, 另外, 也不需要 将鼠标功能的代码写在各个应用程序中, 即可使用鼠标功能, 所以实现方案简单, 用户 体验好。
进一步, 本发明一实施例中在鼠标功能开启时捕捉鼠标动作, 然后将鼠标动作转化为 系统标准事件消息来模拟鼠标操作, 即利用操作系统原有的系统标准事件, 所以不需要 自己定义数据结构和事件, 或者记忆手势或者按键, 用户完全可以按照用户自己习惯的 鼠标操作方式进行操作, 无需重新学习, 不会有记忆负担, 所以使用起来简单方便的多。
更进一步, 本发明一实施例中, 在显示单元的屏幕上添加一显示层, 将鼠标显示在该 显示层上, 以模拟例如在电脑上使用鼠标一样, 直观、 形象, 更方便对电子设备进行操 作。
本领域内的技术人员应明白,本发明的实施例可提供为方法或计算机程序产品。因此, 本发明可采用完全硬件实施例、 完全软件实施例、 或结合软件和硬件方面的实施例的形 式。 而且, 本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存 储介质(包括但不限于磁盘存储器、 CD-ROM、 光学存储器等)上实施的计算机程序产 品的形式。
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序产品的流程图 和 /或方框图来描述的。 应理解可由计算机程序指令实现流程图和 /或方框图中的每一 流程和 /或方框、 以及流程图和 /或方框图中的流程和 /或方框的结合。 可提供这些计 算机程序指令到通用计算机、 专用计算机、 嵌入式处理机或其他可编程数据处理设备的 处理器以产生一个机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指 令产生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方框中指定 的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中, 使得存储在该计算机可读存储器中的指令产生包括指令 装置的制造品, 该指令装置实现在流程图一个流程或多个流程和 /或方框图一个方框或 多个方框中指定的功能。 这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上, 使得在计算机 或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理, 从而在计算机或其 他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和 /或方框图一 个方框或多个方框中指定的功能的步驟。
尽管已描述了本发明的优选实施例, 但本领域内的技术人员一旦得知了基本创造性概 念, 则可对这些实施例做出另外的变更和修改。 所以, 所附权利要求意欲解释为包括优 选实施例以及落入本发明范围的所有变更和修改。
显然, 本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和 范围。 这样, 倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之 内, 则本发明也意图包含这些改动和变型在内。

Claims

权 利 要 求
1、 一种控制鼠标模块的方法, 应用在一装载有操作系统的电子设备中, 所述电子设 备包括至少一个第一类程序功能模块和至少一个第二类程序功能模块, 所述第一类程序功 能模块为在预设时间段内能在所述操作系统后台运行的模块, 所述第二类程序功能模块为 在显示应用界面时才能响应操作的模块, 其特征在于, 所述鼠标模块包括鼠标服务模块及 与所述鼠标服务模块对应的鼠标功能模块, 所述鼠标模块属于所述至少一个第一类程序功 能模块, 所述方法包括:
获得来自第一应用程序模块的鼠标功能控制指令, 其中, 所述第一应用程序模块属于 所述至少一个第二类程序功能模块;
基于所述鼠标功能控制指令, 控制所述鼠标模块, 使所述鼠标功能模块处于运行或关 闭状态。
2、 如权利要求 1 所述的方法, 其特征在于, 所述获得来自第一应用程序模块的鼠标 功能控制指令具体为:
接收来自所述第一应用程序模块的调用所述鼠标功能模块的调用指令。
3、 如权利要求 2所述的方法, 其特征在于, 所述基于所述鼠标功能控制指令, 控制 所述鼠标模块, 使所述鼠标功能模块处于运行或关闭状态具体为:
基于所述调用指令, 控制所述鼠标服务模块处于运行或关闭状态。
4、 如权利要求 1 所述的方法, 其特征在于, 所述获得来自第一应用程序模块的鼠标 功能控制指令具体为:
接收来自所述第一应用程序模块的控制所述鼠标功能模块的广播消息。
5、 如权利要求 4所述的方法, 其特征在于, 所述基于所述鼠标功能控制指令, 控制 所述鼠标模块, 使所述鼠标功能模块处于运行或关闭状态具体为:
基于所述广播消息, 控制所述鼠标功能模块处于运行或关闭状态。
6、 如权利要求 1 所述的方法, 其特征在于, 当所述鼠标功能模块处于运行状态时, 所述方法还包括:
捕捉鼠标动作;
根据所述鼠标动作, 所述鼠标服务模块向所述操作系统发送对应鼠标事件消息。
7、 如权利要求 6所述的方法, 其特征在于, 所述根据所述鼠标动作, 所述鼠标服务 模块向所述操作系统发送对应鼠标事件消息具体为: 按照与所述鼠标动作发生的顺序一致 的顺序发送所述对应鼠标事件消息。
8、 如权利要求 1所述的方法, 其特征在于, 所述电子设备包括显示单元, 当所述鼠 标功能模块处于运行状态时, 获取鼠标在所述显示单元上的坐标信息。
9、如权利要求 8所述的方法, 其特征在于,在所述显示单元的屏幕上添加一显示层, 并将所述鼠标显示在所述显示层对应所述坐标信息的位置上。
10、一种电子设备, 装载有一操作系统, 所述电子设备包括至少一个第一类程序功能 模块和至少一个第二类程序功能模块, 所述第一类程序功能模块为在预设时间段内能在所 述操作系统后台运行的模块, 所述第二类程序功能模块为在显示应用界面时才能响应操作 的模块, 其特征在于, 所述电子设备还包括:
鼠标模块, 包括鼠标服务模块及与所述鼠标服务模块对应的鼠标功能模块,所述鼠标 模块属于所述至少一个第一类程序功能模块;
获得模块, 用于获得来自第一应用程序模块的鼠标功能控制指令, 其中, 所述第一应 用程序模块属于所述至少一个第二类程序功能模块;
控制模块, 用于基于所述鼠标功能控制指令,控制所述鼠标模块,使所述鼠标功能模 块处于运行或关闭状态。
11、 如权利要求 10所述的电子设备, 其特征在于, 所述获得模块具体用于接收来自 所述第一应用程序模块的调用所述鼠标功能模块的调用指令。
12、 如权利要求 11所述的电子设备, 其特征在于, 所述控制模块具体用于基于所述 调用指令, 控制所述鼠标服务模块处于运行或关闭状态。
13、 如权利要求 10所述的电子设备, 其特征在于, 所述获得模块具体用于接收来自 所述第一应用程序模块的控制所述鼠标功能模块的广播消息。
14、 如权利要求 13所述的电子设备, 其特征在于, 所述控制模块具体用于基于所述 广播消息, 控制所述鼠标功能模块处于运行或关闭状态。
15、 如权利要求 10所述的电子设备, 其特征在于, 所述电子设备还包括捕捉模块, 用于当所述鼠标功能模块处于运行状态时, 捕捉鼠标动作, 所述鼠标服务模块根据所述鼠 标动作, 向所述操作系统发送对应鼠标事件消息。
16、一种电子设备, 装载有一操作系统, 其特征在于, 所述电子设备包括: 鼠标模块, 包括鼠标服务模块及与所述鼠标服务模块对应的鼠标功能模块,所述鼠标 模块位于所述操作系统的系统层, 且在预设时间段内能在所述操作系统的后台运行; 鼠标动作识别装置, 安装于所述电子设备上, 当所述鼠标功能模块处于运行状态时, 识别鼠标动作; 其中, 所述鼠标服务模块根据所述鼠标动作, 向所述操作系统发送对应的 鼠标事件消息。
17、 如权利要求 16所述的电子设备, 其特征在于, 所述电子设备还包括屏幕, 在所 述屏幕上具有一显示层, 鼠标显示在所述显示层上。
PCT/CN2012/074916 2012-02-24 2012-04-28 一种控制鼠标模块的方法及电子设备 WO2013123720A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US13/979,376 US20140361991A1 (en) 2012-02-24 2012-04-28 Method and electronic device for controlling mouse module

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201210046342.8 2012-02-24
CN201210046342.8A CN102637127B (zh) 2012-02-24 2012-02-24 一种控制鼠标模块的方法及电子设备

Publications (1)

Publication Number Publication Date
WO2013123720A1 true WO2013123720A1 (zh) 2013-08-29

Family

ID=46621530

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2012/074916 WO2013123720A1 (zh) 2012-02-24 2012-04-28 一种控制鼠标模块的方法及电子设备

Country Status (3)

Country Link
US (1) US20140361991A1 (zh)
CN (2) CN104750498B (zh)
WO (1) WO2013123720A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10428305B2 (en) 2014-05-15 2019-10-01 National University Of Singapore Modified natural killer cells that express IL15 and uses thereof
US11365236B2 (en) 2017-03-27 2022-06-21 Nkarta, Inc. Truncated NKG2D chimeric receptors and uses thereof in natural killer cell immunotherapy
US11896616B2 (en) 2017-03-27 2024-02-13 National University Of Singapore Stimulatory cell lines for ex vivo expansion and activation of natural killer cells

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024575B (zh) * 2012-12-19 2016-08-24 四川长虹电器股份有限公司 一种为Android智能电视机上多应用提供通用服务的方法
CN103389778A (zh) * 2013-07-04 2013-11-13 梁庆生 一种内置鼠标的手机或平板电脑及其控制方法
CN104636158A (zh) * 2013-11-14 2015-05-20 博雅网络游戏开发(深圳)有限公司 基于Android操作系统的鼠标指针控制方法和装置
CN105677309B (zh) * 2014-11-18 2019-03-15 青岛海信移动通信技术股份有限公司 一种显示鼠标的方法及装置
CN111880683A (zh) * 2020-07-09 2020-11-03 天津津航计算技术研究所 vxworks系统下基于windml虚拟设备的触摸屏串口驱动设计方法
CN112351324A (zh) * 2020-10-27 2021-02-09 深圳Tcl新技术有限公司 模拟鼠标控制方法、装置、设备及计算机可读存储介质
CN113031795B (zh) * 2021-05-25 2021-10-12 深圳市飞图视讯有限公司 控制方法、鼠标及上位机

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510125A (zh) * 2009-03-30 2009-08-19 东南大学 一种通过蓝牙实现手机控制计算机键盘鼠标操作的方法
CN102331927A (zh) * 2011-06-24 2012-01-25 浙大网新科技股份有限公司 Wine与安卓手机软键盘输入的整合方法

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6128006A (en) * 1998-03-26 2000-10-03 Immersion Corporation Force feedback mouse wheel and other control wheels
US6707443B2 (en) * 1998-06-23 2004-03-16 Immersion Corporation Haptic trackball device
AU6040999A (en) * 1998-09-14 2000-04-03 Microsoft Corporation Input device with forward/backward control
US8013840B1 (en) * 2000-04-06 2011-09-06 Microsoft Corporation User notification system with an illuminated computer input device
CN1591336B (zh) * 2003-08-25 2010-09-22 联想(北京)有限公司 模拟计算机键盘或鼠标操作的方法
CN1318947C (zh) * 2003-12-19 2007-05-30 威艾德通讯技术(深圳)有限公司 一种软键盘的生成方法
US20070262952A1 (en) * 2006-05-12 2007-11-15 Microsoft Corporation Mapping pointing device messages to media player functions
US8614664B2 (en) * 2009-11-09 2013-12-24 Primax Electronics Ltd. Multi-touch multi-dimensional mouse
US20120179994A1 (en) * 2011-01-12 2012-07-12 Smart Technologies Ulc Method for manipulating a toolbar on an interactive input system and interactive input system executing the method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101510125A (zh) * 2009-03-30 2009-08-19 东南大学 一种通过蓝牙实现手机控制计算机键盘鼠标操作的方法
CN102331927A (zh) * 2011-06-24 2012-01-25 浙大网新科技股份有限公司 Wine与安卓手机软键盘输入的整合方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ZHAN, CHENGGUO ET AL., MAN-MACHINE INTERFACE DESIGN AND IMPLEMENTATION BASED ON ANDROID FOR MEASURING AND CONTROL UNIT, vol. 32, no. 1, January 2012 (2012-01-01), pages 119 - 121 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10428305B2 (en) 2014-05-15 2019-10-01 National University Of Singapore Modified natural killer cells that express IL15 and uses thereof
US10774311B2 (en) 2014-05-15 2020-09-15 National University Of Singapore Natural killer cells modified to express membrane-bound interleukin 15 and uses thereof
US11560548B2 (en) 2014-05-15 2023-01-24 National University Of Singapore Immune cells expressing membrane-bound interleukin 15 (mbIL15) and uses thereof
US11365236B2 (en) 2017-03-27 2022-06-21 Nkarta, Inc. Truncated NKG2D chimeric receptors and uses thereof in natural killer cell immunotherapy
US11896616B2 (en) 2017-03-27 2024-02-13 National University Of Singapore Stimulatory cell lines for ex vivo expansion and activation of natural killer cells

Also Published As

Publication number Publication date
CN104750498B (zh) 2018-12-18
US20140361991A1 (en) 2014-12-11
CN102637127B (zh) 2015-04-08
CN104750498A (zh) 2015-07-01
CN102637127A (zh) 2012-08-15

Similar Documents

Publication Publication Date Title
WO2013123720A1 (zh) 一种控制鼠标模块的方法及电子设备
WO2021057830A1 (zh) 一种信息处理方法及电子设备
US20230325067A1 (en) Cross-device object drag method and device
RU2633367C2 (ru) Способ и устройство для оперирования и управления интеллектуальным устройством
US20220217303A1 (en) Display apparatus and control methods thereof
EP3091426B1 (en) User terminal device providing user interaction and method therefor
WO2016034023A1 (zh) 触发终端的方法及相关设备
US20140223490A1 (en) Apparatus and method for intuitive user interaction between multiple devices
US20150067536A1 (en) Gesture-based Content Sharing Between Devices
WO2020168571A1 (zh) 设备控制方法、装置、系统、电子设备以及云服务器
WO2022048633A1 (zh) 显示方法、装置和电子设备
TW200908738A (en) Codec-driven touch screen video conferencing control system
WO2017114318A1 (zh) 一种触摸屏工作模式的控制方法和控制装置
KR20150134674A (ko) 사용자 단말 및 이의 제어 방법, 그리고 멀티미디어 시스템
WO2014036974A1 (zh) 一种终端设备、同屏显示方法和系统
WO2013182142A1 (zh) 一种终端设备桌面的实现方法、系统及终端设备
KR20160003400A (ko) 디스플레이 장치 및 그 제어 방법
WO2022100309A1 (zh) 桌面元数据的显示方法、访问方法及相关装置
US20230333803A1 (en) Enhanced Screen Sharing Method and System, and Electronic Device
CN113784200A (zh) 通信终端、显示设备及投屏连接方法
CN111901646A (zh) 一种显示设备及触控菜单显示方法
WO2017215671A1 (zh) 接入设备的控制方法、装置及系统
CN110688190A (zh) 智能交互平板的控制方法和装置
WO2021052488A1 (zh) 一种信息处理方法及电子设备
US20230384868A1 (en) Display apparatus

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 13979376

Country of ref document: US

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

Ref document number: 12868946

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: 12868946

Country of ref document: EP

Kind code of ref document: A1