CN102629157A - Message conversion method and device - Google Patents
Message conversion method and device Download PDFInfo
- Publication number
- CN102629157A CN102629157A CN2012100500126A CN201210050012A CN102629157A CN 102629157 A CN102629157 A CN 102629157A CN 2012100500126 A CN2012100500126 A CN 2012100500126A CN 201210050012 A CN201210050012 A CN 201210050012A CN 102629157 A CN102629157 A CN 102629157A
- Authority
- CN
- China
- Prior art keywords
- key
- message
- mouse
- button
- virtual mouse
- 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
- User Interface Of Digital Computer (AREA)
- Input From Keyboards Or The Like (AREA)
- Digital Computer Display Output (AREA)
Abstract
The invention provides a message conversion method and a message conversion device which are applied to an embedded application system. The method comprises the following steps of: acquiring a key message in a message queue; determining a key value of a key corresponding to the message; if the key value is a key value of the key which is preset and needs to be intercepted, converting the message corresponding to the key value into a virtual mouse type message; and sending the virtual mouse type message to a browser of the application system to process. In the embodiment of the invention, for the embedded system without a mouse, the message sent by the preset key on a remote controller can be converted into the virtual mouse type message, so that the browser of the application system, which receives the virtual mouse type message, carries out identification and processing. The problems that in the prior art, the response of the embedded browser on an event depends on focal elements and non-focal elements on a HTML (Hypertext Markup Language) page cannot be processed are solved, so that the satisfaction of a user is improved.
Description
Technical field
The present invention relates to the input technology field, particularly a kind of message conversion method and device.
Background technology
At embedded environment, under the DTV STB environment, generally there is not mouse.Built-in browser under this environment; Owing to there is not mouse; To HTML (HTML; Hypertext Markup Language) focus element (like A label, INPUT label etc.) in the page is operated, and needs to introduce the current focus element, and controls moving of current focus element through the four direction key of telepilot.
Wherein, whether can respond user's operation, be divided into focus element and non-focus element according to the label on the html page (being element).Said focus element can respond user's operation.For example: the A label can respond user's clicking operation, makes browser jump to its hypertext and quotes certain position in the page or the page of (HREF, Hypertext Reference) properties point; The INPUT label can have different types, and input frame can respond user's button, imports corresponding character, and button can respond user's clicking operation, and triggers (onclick) incident etc. of clicking of label.Said non-focus element then only is used for displaying contents, can not respond user's operation.For example: picture (IMG, image) label only is used on the page, showing a width of cloth picture; The TABLE label then is used to show form etc.
But in research and practice process to prior art, inventor of the present invention finds, and is in the existing html page, directly related with mouse to the event definition of label.And do not have mouse under the present embedded environment, if the four direction key that only uses a teleswitch is operated the label on the html page, browser can't be operated the non-focus element on the html page.
Summary of the invention
The embodiment of the invention provides a kind of message conversion method and device, existing does not have in the embedded system of mouse to solve, and browser depends on focus element to the response of incident, and the problem that can not handle non-focus element.
For solving the problems of the technologies described above, the embodiment of the invention provides a kind of message conversion method, is applied to not have in the built-in applied system of mouse, and said method comprises:
Obtain the press key message in the message queue;
Confirm the key assignments of said message corresponding key;
If said key assignments is the key assignments that preestablishes the button that needs interception, the message conversion of then said key-value pair being answered is the virtual mouse kind of message;
Said virtual mouse kind of message is sent to the browser handles of application system.
Preferably, the said button that preestablishes the needs interception is the button relevant with the virtual mouse function.Said button comprises: predefined first function key, directionkeys, confirm key and predefined second function key, wherein, said first function key is used to simulate the virtual mouse on & off switch; Said directionkeys is used to simulate the rolling mouse pointer; Said definite key is used to simulate the virtual mouse left button; Said second function key is used to simulate the virtual mouse right button.
Preferably; The key assignments of the button of interception is the key assignments of predefined first function key if desired; The message conversion of then said key-value pair being answered for the virtual mouse kind of message is: the message that the key-value pair of first function key is answered is set to simulate the message that the key-value pair of virtual mouse on & off switch is answered, and specifically comprises:
Key assignments according to said first function key judges whether the virtual mouse on & off switch is opened;
If do not open the virtual mouse on & off switch; Then open said virtual mouse on & off switch; And said first function key is set to the virtual mouse on & off switch, gets into mouse mode, on display screen, shows mouse pointer so that receive the browser of the key assignments of this first function key;
If open said virtual mouse on & off switch, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch, get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
Preferably, the said position that on display screen, shows mouse pointer, whether the time length according to the virtual mouse on & off switch is closed perhaps, has the page of switching to decide.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of directionkeys, the message conversion of then said key-value pair being answered comprises for the virtual mouse kind of message:
With said directionkeys upwards, downwards, to the left or to the right the key-value pair message conversion of answering is the virtual mouse kind of message of simulation rolling mouse pointer.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle then comprises the message conversion that said key-value pair is answered for confirming the key assignments of key for the virtual mouse kind of message:
The message conversion that the key-value pair of said definite key is answered is the virtual mouse kind of message of analog mouse left button.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle is predefined second function key, the message conversion of then said key-value pair being answered comprises for the virtual mouse kind of message:
The message conversion that the key-value pair of said second function key is answered is the virtual mouse kind of message of analog mouse right button.
Preferably, said method also comprises:
When obtaining press key message, record each by upwards, downwards, time of directionkeys to the left or to the right;
Confirm the speed of button according to per twice interval by the time of same directionkeys;
Confirm the distance that mouse pointer moves according to the speed of said button;
The distance that mouse pointer is moved converts the virtual mouse kind of message of rolling mouse pointer distance into.
Accordingly, the present invention also provides a kind of message conversion device, is applied to not have in the built-in applied system of mouse, and said device comprises:
Acquiring unit is used for obtaining the press key message of message queue;
Key assignments is confirmed the unit, is used for confirming the key assignments of said message corresponding key;
Converting unit, being used at said key assignments is that the message conversion that said key-value pair is answered is the virtual mouse kind of message when preestablishing the key assignments of button of needs interceptions;
Transmitting element is used for said virtual mouse kind of message is sent to the browser handles of application system.
Preferably, the key assignments of the button of interception is the key assignments of predefined first function key if desired, and said converting unit comprises:
Judging unit is used for judging according to the key assignments of said first function key whether the virtual mouse on & off switch is opened,
The first message conversion unit; Be used for when judgment unit judges virtual mouse on & off switch is not opened; Open said virtual mouse on & off switch; And said first function key is set to the virtual mouse on & off switch, gets into mouse mode, on display screen, shows mouse pointer so that receive the browser of this message; Perhaps; When the said virtual mouse on & off switch of judgment unit judges is opened, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch; Get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of directionkeys, said converting unit comprises:
The second message conversion unit, be used for said directionkeys upwards, downwards, to the left or to the right the key-value pair message conversion of answering is the virtual mouse kind of message of simulation rolling mouse pointer.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of definite key, said converting unit comprises:
The 4th message conversion unit, the message conversion that is used for that the key-value pair of said definite key is answered are the virtual mouse kind of message of analog mouse left button.
Preferably, after getting into mouse mode, if the key assignments of the said button that need tackle is predefined second function key, said converting unit comprises:
The 5th message conversion unit, the message conversion that is used for that the key-value pair of said second function key is answered are the virtual mouse kind of message of analog mouse right button.
Preferably, said device also comprises:
Record cell is used for when acquiring unit obtains press key message, record each by upwards, downwards, time of directionkeys to the left or to the right;
First confirms the unit, is used for confirming according to per twice interval by the time of same directionkeys the speed of button;
Second confirms the unit, is used for confirming the distance that mouse pointer moves according to the speed of said button;
The 3rd message conversion unit is used for the distance that mouse pointer moves is converted into the virtual mouse kind of message of rolling mouse pointer distance.
Preferably, said message conversion device is integrated on the telepilot, perhaps is integrated in DTV STB, perhaps independent the deployment.
Can know by technique scheme; In the embodiment of the invention; For the embedded system that does not have mouse, can be the virtual mouse kind of message with the message conversion that programmable button on the telepilot sends, discern and handle so that receive the browser of the application system of this virtual mouse kind of message.Solved in the prior art; Built-in browser is to the response of incident; Depend on focus element (being that built-in browser can respond the operation that programmable button on the telepilot sends), and the problem that can not handle the non-focus element on the html page, thereby user's satisfaction improved.
Description of drawings
Fig. 1 is the process flow diagram of a kind of message conversion method provided by the invention;
Fig. 2 is the process flow diagram of first application example of message conversion method provided by the invention;
Fig. 3 is the process flow diagram of the function of a kind of virtual mouse on & off switch provided by the invention;
Fig. 4 is the process flow diagram of second application example of message conversion method provided by the invention;
Fig. 5 is the process flow diagram of the 3rd application example of message conversion method provided by the invention;
Fig. 6 is the process flow diagram of the 4th application example of message conversion method provided by the invention;
The rising tendency comparison diagram of Fig. 7 total increment that is the total increment when pressing directionkeys at a slow speed provided by the invention when quickening to press directionkeys;
Fig. 8 is the structural representation of a kind of message conversion device provided by the invention.
Embodiment
In order to make those skilled in the art person understand the scheme of the embodiment of the invention better, the embodiment of the invention is done further to specify below in conjunction with accompanying drawing and embodiment.
See also Fig. 1, be the process flow diagram of a kind of message conversion method provided by the invention; Said method is applied to not have in the embedded system of mouse, and said method comprises:
Step 101: obtain the press key message in the message queue;
In this step; When the user presses the button on the telepilot, produce press key message, and press key message is encapsulated in the message queue; Message conversion device in the telepilot can obtain the press key message in the message queue; Certainly, also can be that the message conversion device in the DTV STB obtains the press key message in the message queue, present embodiment does not limit.Press key message can comprise type and the parameter P1 and the P2 of message; P1 and P2 are decided by the type of message, and it is mouse information that the type of message is used for distinguishing, or keyboard message; The type of parameter p 1, p2 is 32 integers of no character type; Practical significance is by type decided, such as, p1, p2 are the codings of button etc.
Step 102: the key assignments of confirming said message corresponding key;
After in step 101, from said message queue, obtaining press key message, from preset key assignments tabulation, obtain the corresponding key assignments of this press key message, said key assignments tabulation comprises the button title on the telepilot, with and corresponding key assignments.
Step 103: if said key assignments is the key assignments that preestablishes the button that needs interception, the message conversion of then said key-value pair being answered is the virtual mouse kind of message;
Wherein, in this embodiment, preestablish the button that needs on the interception telepilot, this button is the button relevant with the virtual mouse function.Said button can comprise: predefined first function key, directionkeys, confirm key and predefined second function key, wherein, said first function key is used to simulate the virtual mouse on & off switch, such as F1, F2 etc.; Said directionkeys is used to simulate the rolling mouse pointer; Said definite key is used to simulate the virtual mouse left button; The said second function key mould is used to intend the virtual mouse right button, such as F3, F4 etc., but is not limited to this, can also be other buttons on the telepilot.
In the present embodiment, the message conversion that said key-value pair is answered is exactly the conversion between existing two types of key assignments, and first generic key comprises: directionkeys, confirm the key and second function key; Second generic key; Its corresponding key assignments is respectively: the key assignments of directionkeys, confirm the key assignments of key and the key assignments of second function key; Second generic key comprises: mouse moves, mouse left click and mouse right click.Its corresponding key assignments is respectively: the key assignments of the key assignments that mouse moves, mouse left click and the key assignments of mouse right click.
That is to say; In this step; If judging this key assignments is the key assignments that needs the button of interception; Then the message conversion with this button becomes the virtual mouse kind of message of being sent by virtual mouse, so that the browser in the application system can be discerned and handle the virtual mouse kind of message that receives.
Step 104: the browser handles that said virtual mouse kind of message is sent to application system.
In this step, browser is discerned and is handled said virtual mouse kind of message after will receiving said virtual mouse kind of message, such as, show the content of said virtual mouse kind of message etc.
In the embodiment of the invention,, can be the virtual mouse kind of message, discern and handle so that receive the browser of the application system of this virtual mouse kind of message with the message conversion that programmable button on the telepilot sends for the embedded system that does not have mouse.Solved in the prior art; Built-in browser is to the response of incident; Depend on focus element (being that built-in browser can respond the operation that programmable button on the telepilot sends), and the problem that can not handle the non-focus element on the html page, thereby user's satisfaction improved.
In the embodiment of the invention, the input to button and mouse realizes through message mechanism.Usually, the message of hardware (such as keyboard or mouse) generation can deposit in the message queue.Get_message (&msg , &p1 , &p2) from message queue, obtains type msg and parameter p 1, the p2 of next bar press key message.Send to browser then.It is mouse information or keyboard message that the type of message is used for distinguishing.The type of parameter p 1, p2 is 32 integers of no character type, and practical significance is by type decided.
The present invention is not having under the situation of mouse, and the present invention defines the button on the telepilot again, promptly to mouse and two kinds of type of message: MSG_MOUSE of keyboard definition and MSG_KEY.Wherein, when type of message was MSG_MOUSE, the value of p1 was sub-type of message; In the value of p2, Gao Siwei is the horizontal ordinate of mouse pointer, and low four is the ordinate of mouse pointer.When type of message was MSG_KEY, the value of p1 was the key assignments of button, and p2 does not then need, and value is 0.
Browser of the present invention is to support browsing of mouse and keyboard message.Browser is to the response of the onmouseover of label, and actual is to occur in when handling mouse information.When browser is received MSG_MOUSE message, and inspection p1 is MOUSE_MOVE, then p2 decomposed, and obtains the horizontal ordinate and the ordinate of current mouse pointer.If find that mouse is outside the shared screen area of label, to move in the shared screen area of label, then trigger the onmouseover incident of carrying out label.
Browser is to the response of the onclick of label, when also being into the processing mouse information.When browser is received MSG_MOUSE message, and inspection p1 is MOUSE_LBUTTONUP, then p2 decomposed, and obtains the horizontal ordinate and the ordinate of current mouse pointer.If find the mouse current location in the shared screen area of label, then trigger the onclick incident of clicking of carrying out label.
Also see also Fig. 2, be the process flow diagram of first application example of message conversion method provided by the invention; In this embodiment, it is predefined first function key that setting needs the button of interception, and said method comprises:
Step 201: obtain the press key message in the message queue;
Step 202: the key assignments of confirming said message corresponding key;
It is above-mentioned that it confirms that specifically the process of the key assignments that button is corresponding sees for details, repeats no more at this.
Step 203: judge whether said key assignments is the key assignments that preestablishes first function key that needs interception, if, execution in step 204; Otherwise, execution in step 206;
Step 204: the message that the key-value pair of said first function key is answered is set to simulate the virtual mouse kind of message that the key-value pair of virtual mouse on & off switch is answered;
This step specifically comprises: the key assignments according to said first function key judges whether the virtual mouse on & off switch is opened; If do not open the virtual mouse on & off switch; Then open said virtual mouse on & off switch; And said first function key is set to the virtual mouse on & off switch, gets into mouse mode, on display screen, shows mouse pointer so that receive the browser of the key assignments of this first function key; If open said virtual mouse on & off switch, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch, get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
Step 205: the browser handles that the virtual mouse kind of message of said simulation virtual mouse on & off switch is sent to application system;
Step 206: the message that the key-value pair of said button is answered directly sends to browser handles.
In this embodiment; If with the message conversion of telepilot output is mouse information, promptly get into mouse mode, need function key of definition; This function key is used for the open and close of virtual mouse function; Can be referred to as the virtual mouse on & off switch, the function of this virtual mouse on & off switch is as shown in Figure 3, specifically comprises:
Step 301: the key assignments that obtains first function key;
Step 302: the key assignments according to first function key judges whether the virtual mouse on & off switch is opened; If not, execution in step 303; If, execution in step 305:
Step 303: press the virtual mouse on & off switch, and said first function key is set to the virtual mouse on & off switch, promptly opens the virtual mouse function;
Step 304: after opening the virtual mouse function, show mouse pointer on the display screen;
Step 305: press the virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch, promptly closes the virtual mouse function;
Certainly, this step also can be that first function key is set to the virtual mouse on & off switch, presses the virtual mouse on & off switch.
Step 306: after closing the virtual mouse function, hide on the display screen.
In the present embodiment; Key assignments according to said first function key judges whether the virtual mouse on & off switch is opened; If do not open; Then open said virtual mouse on & off switch, and the message conversion that the key-value pair of said first function key is answered is opened the virtual mouse kind of message of virtual mouse on & off switch for simulation, on display screen, show mouse pointer so that receive the browser of this message.Otherwise, close said virtual mouse on & off switch, and the message conversion that the key-value pair of said first function key is answered is closed the virtual mouse kind of message of virtual mouse on & off switch for simulation, on display screen, close mouse pointer so that receive the browser of this message.
Preferably, in this embodiment,, then mouse pointer is presented at the centre of screen if open the virtual mouse function for the first time.
If close after the virtual mouse function, open the virtual mouse function in the short time once more, then mouse pointer is shown the position close mouse pointer place before the virtual mouse function.
If long-time virtual mouse function all is in closed condition, when then opening again, still mouse pointer is presented at the centre of screen.Because the situation that the time is long, the operation that the user carries out is more, and the image content on the screen differs greatly, and at this moment remembers having little significance of mouse pointer position, can cause the confusion of vision on the contrary.
And in the short time, also browsing original page such as the user, and at this moment open the virtual mouse function again, mouse pointer is presented at the position before closing, can guarantee operating continuity.
For example, there is a button in the html page lower left corner, needs to use click.If there is not the memory of mouse pointer position, then restart open the virtual mouse function after, need again from screen centre rolling mouse pointer to the button position.
Other direction, if the user has been switched html page, new html page has not had button in the lower left corner, at this moment opens the virtual mouse function again, if mouse is presented at the position of memory, then some is lofty.
So in the present embodiment, the time length that need close according to the virtual mouse on & off switch or user's practical operation (whether the switching page is arranged) determine whether remembering mouse pointer position.
Also see also Fig. 4, be the process flow diagram of second application example of message conversion method provided by the invention; In this embodiment, it is directionkeys that setting needs the button of interception, when opening the virtual mouse function; The message of directionkeys output can be tackled; Promptly after showing mouse pointer on the display screen, if the said button that needs to tackle is a directionkeys, said method comprises:
Step 401: obtain the press key message in the message queue;
Step 402: the key assignments of confirming said message corresponding key;
Step 403: judge whether said key assignments is the key assignments that preestablishes the directionkeys that needs interception, if, execution in step 404; Otherwise, execution in step 406;
Step 404: the message conversion that the key-value pair of said directionkeys is answered is the virtual mouse kind of message of simulation rolling mouse pointer;
In this step, the key assignments of directionkeys on the telepilot is changed (perhaps being provided with) key assignments for simulation virtual mouse key.
Step 405: the browser handles that the virtual mouse kind of message of said simulation rolling mouse pointer is sent to application system;
Step 406: the message that the key-value pair of said button is answered directly sends to browser handles.
In this embodiment, when the virtual mouse function is opened, on screen, shown mouse pointer.When the user presses directionkeys, the message of interception directionkeys output, and come the rolling mouse pointer downwards according to the key assignments (promptly, downwards, left, to the right) of the directionkeys of reality; And be the virtual mouse kind of message with the message conversion that this key-value pair is answered, promptly construct the message of a mouse type, promptly such as; The message of SG_MOUSE type; P1 is that mouse moves, i.e. MOUSE_MOVE, p2 are the composite value of coordinate of the current location of mouse pointer.And abandon original directionkeys output message; With the message of mouse type after the conversion as current message; Be transmitted to browser handles, the processing procedure of message that receives actual mouse output for browser in the processing procedure of browser and the prior art is identical, repeats no more at this.
Preferably, among this embodiment, the direction of passage key is simulated the rolling mouse pointer, and speed is important considering.Whenever pressing primary key, move how many distances, is individual very important problem.If each move too much, possibly cause that some zones can't move on the picture.If each mobile very little, when needs move very long distance, then need move for a long time, user experience is bad.
In the present embodiment, also need define two function keys, be respectively applied for the virtual mouse function when opening (being that the virtual mouse on & off switch is opened), the simulation of mouse right and left key.Usually, existing definite key on the telepilot, function and left mouse button have bigger overlapping, so can directly come the analog mouse left button with definite key.And for right mouse button, then need to define in addition a function key to simulate, any key on the present embodiment definition telepilot except that directionkeys and definite key is second function key.Present embodiment is referred to as analog mouse left button and analog mouse right button respectively.
Treatment scheme such as Fig. 5 and shown in Figure 6 of present embodiment simulation right and left key.
Also see also Fig. 5, be the process flow diagram of the 3rd application example of message conversion method provided by the invention; In this embodiment, the button that setting needs interception is for confirming key, and said definite key is used for the analog mouse left button, after showing mouse pointer on the display screen, if the said button that needs interception for confirming key, said method comprises:
Step 501: obtain the press key message in the message queue;
Step 502: the key assignments of confirming said message corresponding key;
Step 503: judge whether said key assignments is the key assignments that preestablishes the definite key that needs interception, if, execution in step 504; Otherwise, execution in step 506;
Step 504: the message conversion that the key-value pair of said definite key is answered is the virtual mouse kind of message of analog mouse left button;
Step 505: the browser handles that the virtual mouse kind of message of said analog mouse left button is sent to application system;
Step 506: the message that the key-value pair of said button is answered directly sends to browser handles.
Also see also Fig. 6, be the process flow diagram of the 4th application example of message conversion method provided by the invention; In this embodiment, it is predefined second function key that setting needs the button of interception, and said second function key is used for the analog mouse right button.After showing mouse pointer on the display screen, if the said button that needs to tackle is second function key, said method comprises:
Step 601: obtain the press key message in the message queue;
Step 602: the key assignments of confirming said message corresponding key;
Step 603: judge whether said key assignments is the key assignments that preestablishes second function key that needs interception, if, execution in step 604; Otherwise, execution in step 606;
Step 604: the message conversion that the key-value pair of said second function key is answered is the virtual mouse kind of message of analog mouse right button;
Step 605: the browser handles that the virtual mouse kind of message of said analog mouse right button is sent to application system;
Step 606: the message that the key-value pair of said button is answered directly sends to browser handles.
That is to say; In Fig. 5 and embodiment shown in Figure 6; When the virtual mouse on & off switch was opened, message conversion device was understood Engagement Simulation left mouse button and analog mouse right button, and constructed the message of a mouse type according to the key assignments (such as a left side or right) of reality; Message such as the MSG_MOUSE type; P1 is corresponding incident, possibly be MOUSE_LBUTTONDOWN, MOUSE_LBUTTONUP, MOUSE_RBUTTONDOWN, MOUSE_RBUTTONUP, and p2 is the composite value of coordinate of the current location of mouse pointer.Press key message originally will be abandoned, and the message of neotectonics is transmitted to browser handles as current message.
Preferably, in the above-described embodiments, said method can also comprise: record each by upwards, downwards, time of directionkeys to the left or to the right; Confirm the speed of button according to per twice interval by the time of same directionkeys; Confirm the distance that mouse pointer moves according to the speed of said button; The distance that mouse pointer is moved converts the virtual mouse kind of message of rolling mouse pointer distance into.
In this instance, when actual mouse was arranged, the user can directly use the manual manipulation mouse, and the user can be according to the needs of oneself, the speed that decision is moved.
But the speed of directionkeys is not sure of, because between each button, have regular time poor, even long by not putting, telepilot also can only generate press key message with fixing frequency.This frequency maybe be faster than the continuous manually button of user, but possibly still not reach the needed speed of remote rolling mouse pointer.
Therefore, among the present invention, to the conversion process of directionkeys the time, introduce and quicken to move notion.Promptly write down the time of each button, confirm the speed of button according to time interval of twice button, the distance that decides mouse to move according to the speed of button again.
For the ease of understanding, explain with concrete instance below:
The upper left corner of supposing display screen is initial point, and coordinate is (0,0), and for just, vertical direction is with downwards for just with to the right for horizontal direction.
Suppose that mouse pointer is positioned at initial point (0,0), then when the user pressed right key, message conversion device can be tackled right key message, and the rolling mouse pointer, synthetic then new message, and will synthesize new message and issue browser handles.
Suppose under the normal condition that the user presses directionkeys to the right with slower speed, the horizontal ordinate increment of mouse pointer is S.
When supposing the user, increment S is defined increment D again with the continuous button of fast speeds.
Followingly provide the data under the situation and acceleration situation at a slow speed as shown in table 1.
Table 1
In table 1, work as S=1, during D=1, total increment total increment rising tendency figure when quickening contrasts as shown in Figure 7ly in the time of at a slow speed, and Fig. 7 be the rising tendency comparison diagram of total increment and the acceleration when press directionkeys at a slow speed provided by the invention total increment when pressing directionkeys.
Based on the implementation procedure of said method, the present invention is real also to provide a kind of message conversion device, and its structural representation is as shown in Figure 8; Said device is applied to not have in the built-in applied system of mouse, and said device comprises: acquiring unit 81, key assignments are confirmed unit 82; Converting unit 83 and transmitting element 84; Wherein, said acquiring unit 81 is used for obtaining the press key message of message queue; Said key assignments is confirmed unit 82, is used for confirming the key assignments of said message corresponding key; Said converting unit 83, being used at said key assignments is that the message conversion that said key-value pair is answered is the virtual mouse kind of message when preestablishing the key assignments of button of needs interceptions; Said transmitting element 84 is used for said virtual mouse kind of message is sent to the browser handles of application system.
Preferably, the key assignments of the button of interception is the key assignments of predefined first function key if desired, and said converting unit comprises: the judging unit and the first message conversion unit; Wherein, judging unit is used for judging according to the key assignments of said first function key whether the virtual mouse on & off switch is opened; The first message conversion unit; Be used for when judgment unit judges virtual mouse on & off switch is not opened, open said virtual mouse on & off switch, and said first function key being set to the virtual mouse on & off switch; Get into mouse mode, on display screen, show mouse pointer so that receive the browser of this message; Perhaps; When the said virtual mouse on & off switch of judgment unit judges is opened, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch; Get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
Preferably; After getting into mouse mode; Promptly after showing mouse pointer on the display screen; If said to need the key assignments of the button of interception be the key assignments of directionkeys, said converting unit comprises: the second message conversion unit, be used for said directionkeys upwards, downwards, to the left or to the right the key-value pair message conversion of answering is the virtual mouse kind of message of simulation rolling mouse pointer.
Preferably, in the second message conversion unit with said directionkeys upwards, downwards, after to the left or to the right the key-value pair virtual mouse kind of message of message conversion for simulation rolling mouse pointer of answering, said device can also comprise: record cell; First confirms the unit; Second confirms unit and the 3rd message conversion unit, wherein, and said record cell; Be used for when acquiring unit obtains press key message, record each by upwards, downwards, time of directionkeys to the left or to the right; Said first confirms the unit, is used for confirming according to per twice interval by the time of same directionkeys the speed of button; Said second confirms the unit, is used for confirming the distance that mouse pointer moves according to the speed of said button; Said the 3rd message conversion unit is used for the distance that mouse pointer moves is converted into the virtual mouse kind of message of rolling mouse pointer distance.
Preferably; After getting into mouse mode; Promptly after showing mouse pointer on the display screen; If the key assignments of the said button that need tackle is for confirming the key assignments of key, said converting unit comprises: the 4th message conversion unit, the message conversion that is used for that the key-value pair of said definite key is answered are the virtual mouse kind of message of analog mouse left button.
Preferably; After getting into mouse mode; Promptly after showing mouse pointer on the display screen; If the key assignments of the said button that need tackle is predefined second function key, said converting unit comprises: the 5th message conversion unit, the message conversion that is used for that the key-value pair of said second function key is answered are the virtual mouse kind of message of analog mouse right button.
In the above-described embodiments, said message conversion device can be integrated on the telepilot, also can be integrated in DTV STB, also can independently dispose.
In the embodiment of the invention,, can be the virtual mouse kind of message, discern and handle so that receive the browser of the application system of this virtual mouse kind of message with the message conversion that programmable button on the telepilot sends for the embedded system that does not have mouse.Solved in the prior art; Built-in browser is to the response of incident; Depend on focus element (being that built-in browser can respond the operation that programmable button on the telepilot sends), and the problem that can not handle the non-focus element on the html page, thereby user's satisfaction improved.
Also need to prove; In this article; Relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint relation or the order that has any this reality between these entities or the operation.And; Term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability; Thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements; But also comprise other key elements of clearly not listing, or also be included as this process, method, article or equipment intrinsic key element.Under the situation that do not having much more more restrictions, the key element that limits by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises said key element and also have other identical element.
Through the description of above embodiment, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better embodiment under a lot of situation.Based on such understanding; The part that technical scheme of the present invention contributes to prior art in essence in other words can be come out with the embodied of software product; This computer software product can be stored in the storage medium, like ROM/RAM, magnetic disc, CD etc., comprises that some instructions are with so that a computer equipment (can be a personal computer; Server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
The above only is a preferred implementation of the present invention; Should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; Can also make some improvement and retouching, these improvement and retouching also should be regarded as protection scope of the present invention.
Claims (15)
1. a message conversion method is characterized in that, is applied to not have in the built-in applied system of mouse, and said method comprises:
Obtain the press key message in the message queue;
Confirm the key assignments of said message corresponding key;
If said key assignments is the key assignments that preestablishes the button that needs interception, the message conversion of then said key-value pair being answered is the virtual mouse kind of message;
Said virtual mouse kind of message is sent to the browser handles of application system.
2. method according to claim 1 is characterized in that, the said button that preestablishes the needs interception is the button relevant with the virtual mouse function.Said button comprises: predefined first function key, directionkeys, confirm key and predefined second function key, wherein, said first function key is used to simulate the virtual mouse on & off switch; Said directionkeys is used to simulate the rolling mouse pointer; Said definite key is used to simulate the virtual mouse left button; Said second function key is used to simulate the virtual mouse right button.
3. method according to claim 2; It is characterized in that; The key assignments of the button of interception is the key assignments of predefined first function key if desired; The message conversion of then said key-value pair being answered for the virtual mouse kind of message is: the message that the key-value pair of first function key is answered is set to simulate the message that the key-value pair of virtual mouse on & off switch is answered, and specifically comprises:
Key assignments according to said first function key judges whether the virtual mouse on & off switch is opened;
If do not open the virtual mouse on & off switch; Then open said virtual mouse on & off switch; And said first function key is set to the virtual mouse on & off switch, gets into mouse mode, on display screen, shows mouse pointer so that receive the browser of the key assignments of this first function key;
If open said virtual mouse on & off switch, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch, get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
4. method according to claim 3 is characterized in that, the said position that on display screen, shows mouse pointer, and whether the time length according to the virtual mouse on & off switch is closed perhaps, has the page of switching to decide.
5. method according to claim 2 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of directionkeys, the message conversion of then said key-value pair being answered comprises for the virtual mouse kind of message:
With said directionkeys upwards, downwards, to the left or to the right the key-value pair message conversion of answering is the virtual mouse kind of message of simulation rolling mouse pointer.
6. method according to claim 2 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle then comprises the message conversion that said key-value pair is answered for confirming the key assignments of key for the virtual mouse kind of message:
The message conversion that the key-value pair of said definite key is answered is the virtual mouse kind of message of analog mouse left button.
7. method according to claim 2 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle is predefined second function key, the message conversion of then said key-value pair being answered comprises for the virtual mouse kind of message:
The message conversion that the key-value pair of said second function key is answered is the virtual mouse kind of message of analog mouse right button.
8. according to each described method of claim 1 to 7, it is characterized in that said method also comprises:
When obtaining press key message, record each by upwards, downwards, time of directionkeys to the left or to the right;
Confirm the speed of button according to per twice interval by the time of same directionkeys;
Confirm the distance that mouse pointer moves according to the speed of said button;
The distance that mouse pointer is moved converts the virtual mouse kind of message of rolling mouse pointer distance into.
9. a message conversion device is characterized in that, is applied to not have in the built-in applied system of mouse, and said device comprises:
Acquiring unit is used for obtaining the press key message of message queue;
Key assignments is confirmed the unit, is used for confirming the key assignments of said message corresponding key;
Converting unit, being used at said key assignments is that the message conversion that said key-value pair is answered is the virtual mouse kind of message when preestablishing the key assignments of button of needs interceptions;
Transmitting element is used for said virtual mouse kind of message is sent to the browser handles of application system.
10. device according to claim 9 is characterized in that, the key assignments of the button of interception is the key assignments of predefined first function key if desired, and said converting unit comprises:
Judging unit is used for judging according to the key assignments of said first function key whether the virtual mouse on & off switch is opened,
The first message conversion unit; Be used for when judgment unit judges virtual mouse on & off switch is not opened; Open said virtual mouse on & off switch; And said first function key is set to the virtual mouse on & off switch, gets into mouse mode, on display screen, shows mouse pointer so that receive the browser of this message; Perhaps; When the said virtual mouse on & off switch of judgment unit judges is opened, then close said virtual mouse on & off switch, and first function key is set to the virtual mouse on & off switch; Get into general mode, on display screen, close mouse pointer so that receive the browser of this message.
11. device according to claim 10 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of directionkeys, said converting unit comprises:
The second message conversion unit, be used for said directionkeys upwards, downwards, to the left or to the right the key-value pair message conversion of answering is the virtual mouse kind of message of simulation rolling mouse pointer.
12. device according to claim 10 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle is the key assignments of definite key, said converting unit comprises:
The 4th message conversion unit, the message conversion that is used for that the key-value pair of said definite key is answered are the virtual mouse kind of message of analog mouse left button.
13. device according to claim 10 is characterized in that, after getting into mouse mode, if the key assignments of the said button that need tackle is predefined second function key, said converting unit comprises:
The 5th message conversion unit, the message conversion that is used for that the key-value pair of said second function key is answered are the virtual mouse kind of message of analog mouse right button.
14., it is characterized in that said device also comprises according to each described device of claim 9 to 13:
Record cell is used for when acquiring unit obtains press key message, record each by upwards, downwards, time of directionkeys to the left or to the right;
First confirms the unit, is used for confirming according to per twice interval by the time of same directionkeys the speed of button;
Second confirms the unit, is used for confirming the distance that mouse pointer moves according to the speed of said button;
The 3rd message conversion unit is used for the distance that mouse pointer moves is converted into the virtual mouse kind of message of rolling mouse pointer distance.
15., it is characterized in that said message conversion device is integrated on the telepilot, perhaps be integrated in DTV STB, perhaps independent the deployment according to each described device of claim 9 to 13.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210050012.6A CN102629157B (en) | 2012-02-29 | 2012-02-29 | Message conversion method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210050012.6A CN102629157B (en) | 2012-02-29 | 2012-02-29 | Message conversion method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102629157A true CN102629157A (en) | 2012-08-08 |
CN102629157B CN102629157B (en) | 2015-07-08 |
Family
ID=46587420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210050012.6A Active CN102629157B (en) | 2012-02-29 | 2012-02-29 | Message conversion method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102629157B (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103997673A (en) * | 2014-05-15 | 2014-08-20 | Tcl集团股份有限公司 | Event processing method and device |
CN104202637A (en) * | 2014-08-27 | 2014-12-10 | 深圳市启望科文技术有限公司 | Key remote control and target dragging method |
CN104202638A (en) * | 2014-08-27 | 2014-12-10 | 深圳市启望科文技术有限公司 | Key remote control and method for controlling electronic device through same |
WO2015062437A1 (en) * | 2013-10-30 | 2015-05-07 | 乐视致新电子科技(天津)有限公司 | Browser-based method and device for indicating mode switch |
CN105451050A (en) * | 2014-08-27 | 2016-03-30 | 深圳市启望科文技术有限公司 | Key remote control and method for amplifying target |
CN105451051A (en) * | 2014-08-27 | 2016-03-30 | 深圳市启望科文技术有限公司 | Key remote control and method for controlling electronic device by use of key remote control |
CN106293488A (en) * | 2016-08-04 | 2017-01-04 | 深圳市鸿宇顺软件有限公司 | A kind of implementation method of the virtual mouse for non-touch screen smart machine |
CN109309854A (en) * | 2017-07-26 | 2019-02-05 | 深圳市中兴微电子技术有限公司 | Automatically switch the system and method for remote controler mode and mouse mode based on scene |
CN115334343A (en) * | 2022-08-01 | 2022-11-11 | 中国电信股份有限公司 | Method and device for controlling IPTV service |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1975644A (en) * | 2006-12-29 | 2007-06-06 | 中国电信股份有限公司 | Method and apparatus for providing mouse function to remote controller |
CN201035752Y (en) * | 2007-04-24 | 2008-03-12 | 中兴通讯股份有限公司 | Television set up box-remote controller device with input function |
CN101324803A (en) * | 2007-06-11 | 2008-12-17 | 厦门哈隆电子有限公司 | Remote control method and device of personal computer medium player |
CN102156559A (en) * | 2011-04-19 | 2011-08-17 | 深圳Tcl新技术有限公司 | Method and device for simulating mouse operation by using web television remote controller |
-
2012
- 2012-02-29 CN CN201210050012.6A patent/CN102629157B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1975644A (en) * | 2006-12-29 | 2007-06-06 | 中国电信股份有限公司 | Method and apparatus for providing mouse function to remote controller |
CN201035752Y (en) * | 2007-04-24 | 2008-03-12 | 中兴通讯股份有限公司 | Television set up box-remote controller device with input function |
CN101324803A (en) * | 2007-06-11 | 2008-12-17 | 厦门哈隆电子有限公司 | Remote control method and device of personal computer medium player |
CN102156559A (en) * | 2011-04-19 | 2011-08-17 | 深圳Tcl新技术有限公司 | Method and device for simulating mouse operation by using web television remote controller |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2015062437A1 (en) * | 2013-10-30 | 2015-05-07 | 乐视致新电子科技(天津)有限公司 | Browser-based method and device for indicating mode switch |
CN103997673A (en) * | 2014-05-15 | 2014-08-20 | Tcl集团股份有限公司 | Event processing method and device |
CN103997673B (en) * | 2014-05-15 | 2018-11-20 | Tcl集团股份有限公司 | A kind of event-handling method and device |
CN104202637A (en) * | 2014-08-27 | 2014-12-10 | 深圳市启望科文技术有限公司 | Key remote control and target dragging method |
CN104202638A (en) * | 2014-08-27 | 2014-12-10 | 深圳市启望科文技术有限公司 | Key remote control and method for controlling electronic device through same |
CN105451050A (en) * | 2014-08-27 | 2016-03-30 | 深圳市启望科文技术有限公司 | Key remote control and method for amplifying target |
CN105451051A (en) * | 2014-08-27 | 2016-03-30 | 深圳市启望科文技术有限公司 | Key remote control and method for controlling electronic device by use of key remote control |
CN106293488A (en) * | 2016-08-04 | 2017-01-04 | 深圳市鸿宇顺软件有限公司 | A kind of implementation method of the virtual mouse for non-touch screen smart machine |
CN109309854A (en) * | 2017-07-26 | 2019-02-05 | 深圳市中兴微电子技术有限公司 | Automatically switch the system and method for remote controler mode and mouse mode based on scene |
CN109309854B (en) * | 2017-07-26 | 2021-06-01 | 深圳市中兴微电子技术有限公司 | System and method for automatically switching remote controller mode and mouse mode based on scene |
CN115334343A (en) * | 2022-08-01 | 2022-11-11 | 中国电信股份有限公司 | Method and device for controlling IPTV service |
Also Published As
Publication number | Publication date |
---|---|
CN102629157B (en) | 2015-07-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102629157A (en) | Message conversion method and device | |
US8786555B2 (en) | Feedback-providing keypad for touchscreen devices | |
CN100511101C (en) | Display device capable of selecting a displayed object by using a remote controller and method thereof | |
CN103973771B (en) | Method and system for sharing part Web page | |
US10228835B2 (en) | Method for displaying information, and terminal equipment | |
KR20080040035A (en) | A method and a device for browsing information feeds | |
CN105204797A (en) | Screen sharing method and device using same | |
CN103809844B (en) | A kind of state prompt method and electronic equipment | |
CN112099707A (en) | Display method and device and electronic equipment | |
JP2007026356A (en) | Information-processing device, processing method in its information-processing device, and program for making computer execute its method | |
KR20150081181A (en) | Display apparatus and Method for providing recommendation characters thereof | |
US20130021275A1 (en) | Display method and terminal | |
CN103747308A (en) | Method and system for controlling smart television with analog keys, and mobile terminal | |
CN103970839A (en) | Method for controlling webpage browsing through voice | |
CN102637127A (en) | Method for controlling mouse modules and electronic device | |
CN107077296A (en) | Subscriber terminal equipment and the method for controlling subscriber terminal equipment | |
KR20070029472A (en) | Virtual keyboard displaying apparatus and method for preventing exposure of input contents | |
CN106843794A (en) | A kind of multi-screen display method and system based on Android | |
CN103294351B (en) | A kind of display packing and electronic equipment | |
CN106855772A (en) | A kind of information displaying method and device | |
US11455071B2 (en) | Layout method, device and equipment for window control bars | |
US10628031B2 (en) | Control instruction identification method and apparatus, and storage medium | |
CN102681780A (en) | Intelligent Linux device and input method switching method for same | |
CN113325980B (en) | Control method, control device, electronic equipment and readable storage medium | |
TW201624252A (en) | Information integrating system and method |
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 |