Movatterモバイル変換


[0]ホーム

URL:


CN108132719A - The implementation method and device of mouse roller based on vxworks operating system - Google Patents

The implementation method and device of mouse roller based on vxworks operating system
Download PDF

Info

Publication number
CN108132719A
CN108132719ACN201611093880.7ACN201611093880ACN108132719ACN 108132719 ACN108132719 ACN 108132719ACN 201611093880 ACN201611093880 ACN 201611093880ACN 108132719 ACN108132719 ACN 108132719A
Authority
CN
China
Prior art keywords
mouse
offset
idler wheel
data packet
mouses
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.)
Pending
Application number
CN201611093880.7A
Other languages
Chinese (zh)
Inventor
毛卫龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Loongson Technology Corp Ltd
Original Assignee
Loongson Technology Corp Ltd
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 Loongson Technology Corp LtdfiledCriticalLoongson Technology Corp Ltd
Priority to CN201611093880.7ApriorityCriticalpatent/CN108132719A/en
Publication of CN108132719ApublicationCriticalpatent/CN108132719A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The present invention provides a kind of implementation methods and device of the mouse roller based on vxworks operating system, it is related to field of computer technology, solves the defects of mouse consumption cpu resource mobile come inconvenient for operation caused by the scroll bar of operation pages window and long range using left mouse button in vxworks operating system.The implementation method of the mouse roller based on vxworks operating system includes:When the startup for detecting vxworks operating system, the enabled instruction of compiling generation is sent to mouse to enable the idler wheel pattern of the mouse;Receive the displacement data packet that the mouse is sent;The displacement data packet is read to obtain the target location coordinate of the mouse rollovers;The cursor of the mouse is controlled to be moved to the corresponding position of screen according to the target location coordinate of the mouse rollovers.

Description

The implementation method and device of mouse roller based on vxworks operating system
Technical field
The present invention relates to field of computer technology more particularly to a kind of mouse rollers based on vxworks operating systemImplementation method and device.
Background technology
At present, the keypress function of mouse is usually only supported in vxworks operating system, does not support the idler wheel work(of mouseCan, when this allows for operating the page window with scroll bar in vxworks operating system, it is necessary to which mouse is moved to rollingAt the upper and lower small black triangle of item, then by clicking left mouse button come the scroll bar of scroll through pages window.
In the implementation of the present invention, inventor has found at least to have the following technical problems in the prior art:
If mouse distance scroll item is distant, needing to be moved over long distances mouse needs in mouse moving process is handledConsume cpu resource.
Invention content
The implementation method and device of mouse roller provided by the invention based on vxworks operating system, Neng GouUsing mouse roller come the scroll bar of operation pages window in vxworks operating system, so that processing carries scroll barOperation is more convenient during page window, while is also avoided that due to cpu resource consumption caused by the mobile mouse of long-time.
In a first aspect, the present invention provides a kind of implementation method of the mouse roller based on vxworks operating system, it is applied toMain frame, including:When the startup for detecting vxworks operating system the enabled instruction of compiling generation be sent to mouse so thatThe idler wheel pattern of the energy mouse;Receive the displacement data packet that the mouse is sent;The displacement data packet is read to obtainState the target location coordinate of mouse rollovers;The cursor for controlling the mouse according to the target location coordinate of the mouse rollovers movesTo the corresponding position of screen.
Further, if the mouse is the PS/2 mouses of standard, the idler wheel pattern packet for enabling the mouseIt includes:The sample rate of the PS/2 mouses is set;It sends mouse ID and obtains order to the PS/2 mouses;Receive the PS/2 mousesThe mouse ID response commands of feedback, and determine whether the PS/2 mouses support idler wheel work(according to the mouse ID response commandsEnergy;If the PS/2 mouses support roller function, the idler wheel pattern of the mouse is enabled.
Optionally, if the mouse is USB mouse, the idler wheel pattern for enabling the mouse includes:ByThe operating mode of setting mouse is idler wheel pattern in the configuration interface of the USB mouse.
Further, the offset of the horizontal direction of the displacement data packet including the PS/2 mouses, vertical directionOffset and idler wheel offset;It is described to read the displacement data packet to obtain the target location coordinate of the mouse rollovers, it wrapsIt includes:Read the offset of horizontal direction, the offset of vertical direction and the idler wheel offset in the mobile data packet;According to instituteState the mesh that the offset of horizontal direction, the offset of the vertical direction and the idler wheel offset determine the mouse rolloversCursor position coordinate.
Optionally, the key-press status of the displacement data packet including the USB mouse, horizontal direction offset, verticalThe offset in direction and idler wheel offset;It is described to read the displacement data packet to obtain the target location of mouse rollovers seatMark, including:Read key-press status, the offset of horizontal direction, the offset of vertical direction and the rolling in the mobile data packetTake turns offset;According to the key-press status, the offset of the horizontal direction, the offset of the vertical direction and the rollingWheel offset determines the target location coordinate of the mouse rollovers.
Second aspect, the present invention provides a kind of realization device of the mouse roller based on vxworks operating system, positioned at meterMachine host is calculated, including:
Enabled module, for when the startup for detecting vxworks operating system the enabled instruction of compiling generation be sent to mouseIt is marked with the idler wheel pattern of the enabled mouse;
Receiving module, for receiving the displacement data packet that the mouse is sent;
Read module, for reading the displacement data packet to obtain the target location coordinate of the mouse rollovers;
Control module, the cursor for controlling the mouse according to the target location coordinate of the mouse rollovers are moved to screenThe corresponding position of curtain.
Further, if the mouse is the PS/2 mouses of standard, the enabled module includes:
Setting unit, for setting the sample rate of the PS/2 mouses;
Transmitting element obtains order to the PS/2 mouses for sending mouse ID;
Receiving unit, for receiving the mouse ID response commands of the PS/2 mouses feedback;
Determination unit, for determining whether the PS/2 mouses support roller function according to the mouse ID response commands;
Enabling unit if determining that the PS/2 mouses support roller function for the determination unit, enables describedThe idler wheel pattern of mouse.
Optionally, if the mouse is USB mouse, the enabled module, for passing through matching in the USB mouseThe operating mode for putting setting mouse in interface is idler wheel pattern.
Further, the offset of the horizontal direction of the displacement data packet including the PS/2 mouses, vertical directionOffset and idler wheel offset;
The read module, for reading the offset of the key-press status in the mobile data packet, horizontal direction, verticalThe offset in direction and idler wheel offset, and according to the key-press status, the offset of the horizontal direction, the vertical directionOffset and the idler wheel offset determine the target location coordinates of the mouse rollovers.
Optionally, the key-press status of the displacement data packet including the USB mouse, horizontal direction offset, verticalThe offset in direction and idler wheel offset;
The read module, for reading the offset of the key-press status in the mobile data packet, horizontal direction, verticalThe offset in direction and idler wheel offset, and according to the key-press status, the offset of the horizontal direction, the vertical directionOffset and the idler wheel offset determine the target location coordinates of the mouse rollovers.
The implementation method and device of mouse roller provided in an embodiment of the present invention based on vxworks operating system, work as inspectionThe enabled instruction of compiling generation is sent to mouse to enable the idler wheel mould of the mouse when measuring the startup of vxworks operating systemFormula;Receive the displacement data packet that the mouse is sent;The displacement data packet is read to obtain the target position of the mouse rolloversPut coordinate;The cursor of the mouse is controlled to be moved to the corresponding position of screen according to the target location coordinate of the mouse rollovers.Compared with prior art, can in vxworks operating system using mouse roller come the scroll bar of operation pages window, so as toSo that operation is more convenient during page window of the processing with scroll bar, while also it is avoided that since the mobile mouse of long-time is broughtCpu resource consumption.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show belowThere is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is onlySome embodiments of the present invention for those of ordinary skill in the art, without creative efforts, may be used alsoTo obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow chart of the implementation method embodiment of the mouse roller the present invention is based on vxworks operating system;
Fig. 2 is the structure diagram of the realization device embodiment of the mouse roller the present invention is based on vxworks operating system.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present inventionIn attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is onlyOnly it is part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skillPersonnel's all other embodiments obtained without making creative work, shall fall within the protection scope of the present invention.
The present invention provides a kind of implementation method of the mouse roller based on vxworks operating system, applied to calculating ownerMachine, there are many kinds of the forms of mouse, with interface point, common are at present (personal 2, the PS/2) mouse of personal system 2 andUSB mouse.Following embodiment is described in detail with PS/2 mouses and USB, as shown in Figure 1, the method for the present embodiment includes:
S11, when the startup for detecting vxworks operating system the enabled instruction of compiling generation be sent to the mouse so thatThe idler wheel pattern of the energy mouse.
It in the present embodiment can be by compiling the enabled instruction of mouse-driven generation.
When the mouse is PS/2 mouses, then the idler wheel pattern for enabling the mouse includes:The PS/2 is setThe sample rate of mouse;It sends mouse ID and obtains order to the PS/2 mouses;The mouse ID for receiving the PS/2 mouses feedback is rungIt should order, and determine whether the PS/2 mouses support roller function according to the mouse ID response commands;If the PS/2Mouse supports roller function, then enables the idler wheel pattern of the mouse.
When the mouse is USB mouse, then the idler wheel pattern for enabling the mouse includes:By in the USBThe operating mode of setting mouse is idler wheel pattern in the configuration interface of mouse.
S12, the displacement data packet that the mouse is sent is received.
When mouse is PS/2 mouses, the displacement data packet includes the offset of the offset, vertical direction of horizontal directionAmount and idler wheel offset.Specifically, the displacement data packet includes for 3 byte datas, wherein, the 1st byte, the 2nd byte and the 3rdByte represents the offset of horizontal direction, the offset of vertical direction and idler wheel offset of the PS/2 mouses respectively.
When mouse is USB mouse, the displacement data packet includes key-press status, the offset of horizontal direction, Vertical SquareTo offset and idler wheel offset.Specifically, the displacement data packet is 4 byte data packets, wherein, the 1st byte, the 2nd wordSection, the 3rd byte and the 4th byte represent the key-press status of the USB mouse, the offset of horizontal direction, vertical direction respectivelyOffset and idler wheel offset.
S13, the displacement data packet is read to obtain the target location coordinate of the mouse rollovers.
It is described to read the displacement data packet to obtain the target location of the mouse rollovers when mouse is PS/2 mousesCoordinate, including:Read the offset of horizontal direction, the offset of vertical direction and the idler wheel offset in the mobile data packetAmount;The mouse is determined according to the offset of the horizontal direction, the offset of the vertical direction and the idler wheel offsetMark the target location coordinate rolled.
It is described to read the displacement data packet to obtain the target position of the mouse rollovers when the mouse is USB mouseCoordinate is put, including:Read key-press status in the mobile data packet, horizontal direction offset, the offset of vertical directionWith idler wheel offset;According to the key-press status, the offset of the horizontal direction, the offset of the vertical direction and instituteState the target location coordinate that idler wheel offset determines the mouse rollovers.
S14, the cursor of the mouse is controlled to be moved to the corresponding of screen according to the target location coordinate of the mouse rolloversPosition.
The implementation method of mouse roller provided in an embodiment of the present invention based on vxworks operating system, with the prior artCompare, can in vxworks operating system using mouse roller come the scroll bar of operation pages window so that processing bandOperation is more convenient when having the page window of scroll bar, while is also avoided that due to cpu resource caused by the mobile mouse of long-timeConsumption.
The embodiment of the present invention provides a kind of realization device of the mouse roller based on vxworks operating system, positioned at calculatingMachine host, as shown in Fig. 2, the device of the present embodiment includes:
Enabled module 21, for when the startup for detecting vxworks operating system the enabled instruction of compiling generation be sent toMouse is with the idler wheel pattern of the enabled mouse;
Receiving module 22, for receiving the displacement data packet that the mouse is sent;
Read module 23, for reading the displacement data packet to obtain the target location coordinate of the mouse rollovers;
Control module 24, the cursor for controlling the mouse according to the target location coordinate of the mouse rollovers are moved toThe corresponding position of screen.
The realization device of mouse roller provided in an embodiment of the present invention based on vxworks operating system, with the prior artCompare, can in vxworks operating system using mouse roller come the scroll bar of operation pages window so that processing bandOperation is more convenient when having the page window of scroll bar, while is also avoided that due to cpu resource caused by the mobile mouse of long-timeConsumption.
In the above-described embodiments, if the mouse is PS/2 mouses, the enabled module 21 specifically includes:
Setting unit, for setting the sample rate of the PS/2 mouses;
Transmitting element obtains order to the PS/2 mouses for sending mouse ID;
Receiving unit, for receiving the mouse ID response commands of the PS/2 mouses feedback;
Determination unit, for determining whether the PS/2 mouses support roller function according to the mouse ID response commands;
Enabling unit if determining that the PS/2 mouses support roller function for the determination unit, enables describedThe idler wheel pattern of mouse.
Correspondingly, the offset of the horizontal direction of the displacement data packet including the PS/2 mouses, vertical direction it is inclinedShifting amount and idler wheel offset.
Specifically, the displacement data packet includes for 3 byte datas, wherein, the 1st byte, the 2nd byte and the 3rd byte pointThe offset of horizontal direction, the offset of vertical direction and idler wheel offset of the PS/2 mouses are not represented.
Correspondingly, the read module 23, for read the key-press status in the mobile data packet, horizontal direction it is inclinedShifting amount, the offset of vertical direction and idler wheel offset, and according to the key-press status, the offset of the horizontal direction, instituteIt states the offset of vertical direction and the idler wheel offset determines the target location coordinate of the mouse rollovers.
In the above-described embodiments, if the mouse is USB mouse, the enabled module, specifically for by instituteThe operating mode for stating setting mouse in the configuration interface of USB mouse is idler wheel pattern.
Correspondingly, the key-press status of the displacement data packet including the USB mouse, horizontal direction offset, verticalThe offset in direction and idler wheel offset.
Specifically, the displacement data packet is 4 byte data packets, wherein, the 1st byte, the 2nd byte, the 3rd byte and the 4thByte represents the key-press status of the USB mouse, the offset of horizontal direction, the offset of vertical direction and idler wheel offset respectivelyAmount.
Correspondingly, the read module 23, for read the key-press status in the mobile data packet, horizontal direction it is inclinedShifting amount, the offset of vertical direction and idler wheel offset, and according to the key-press status, the offset of the horizontal direction, instituteIt states the offset of vertical direction and the idler wheel offset determines the target location coordinate of the mouse rollovers.
One of ordinary skill in the art will appreciate that realizing all or part of flow in above-described embodiment method, being can be withRelevant hardware is instructed to complete by computer program, the program can be stored in a computer read/write memory mediumIn, the program is when being executed, it may include such as the flow of the embodiment of above-mentioned each method.Wherein, the storage medium can be magneticDish, CD, read-only memory (Read-Only Memory, ROM) or random access memory (Random AccessMemory, RAM) etc..
The above description is merely a specific embodiment, but protection scope of the present invention is not limited thereto, anyThose familiar with the art in the technical scope disclosed by the present invention, all should by the change or replacement that can be readily occurred inIt is included within the scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.

Claims (10)

CN201611093880.7A2016-12-012016-12-01The implementation method and device of mouse roller based on vxworks operating systemPendingCN108132719A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201611093880.7ACN108132719A (en)2016-12-012016-12-01The implementation method and device of mouse roller based on vxworks operating system

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201611093880.7ACN108132719A (en)2016-12-012016-12-01The implementation method and device of mouse roller based on vxworks operating system

Publications (1)

Publication NumberPublication Date
CN108132719Atrue CN108132719A (en)2018-06-08

Family

ID=62388205

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201611093880.7APendingCN108132719A (en)2016-12-012016-12-01The implementation method and device of mouse roller based on vxworks operating system

Country Status (1)

CountryLink
CN (1)CN108132719A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN201001148Y (en)*2006-10-102008-01-02郭兵Embedded type digital entertainment parlor system
CN101390039A (en)*2006-01-052009-03-18苹果公司Keyboards for portable electronic devices
CN102073392A (en)*2009-10-292011-05-25原相科技股份有限公司Hybrid pointing device
CN102156588A (en)*2011-03-162011-08-17中国科学院上海技术物理研究所Embedded infrared real-time signal processing system
CN202584044U (en)*2012-04-202012-12-05深圳市茁迩科技发展有限公司Air mouse wheel unit and air mouse
US20130111346A1 (en)*2011-10-312013-05-02Apple Inc.Dual function scroll wheel input
CN103324348A (en)*2013-06-282013-09-25华南理工大学Windows desktop control method based on intelligent mobile terminals
US20130332867A1 (en)*2012-06-122013-12-12Apple Inc.Input device event processing
US20140143711A1 (en)*2004-08-302014-05-22Qnx Software Systems LimitedMethod and system for providing transparent access to hardware graphic layers

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20140143711A1 (en)*2004-08-302014-05-22Qnx Software Systems LimitedMethod and system for providing transparent access to hardware graphic layers
CN101390039A (en)*2006-01-052009-03-18苹果公司Keyboards for portable electronic devices
CN201001148Y (en)*2006-10-102008-01-02郭兵Embedded type digital entertainment parlor system
CN102073392A (en)*2009-10-292011-05-25原相科技股份有限公司Hybrid pointing device
CN102156588A (en)*2011-03-162011-08-17中国科学院上海技术物理研究所Embedded infrared real-time signal processing system
US20130111346A1 (en)*2011-10-312013-05-02Apple Inc.Dual function scroll wheel input
CN202584044U (en)*2012-04-202012-12-05深圳市茁迩科技发展有限公司Air mouse wheel unit and air mouse
US20130332867A1 (en)*2012-06-122013-12-12Apple Inc.Input device event processing
CN103324348A (en)*2013-06-282013-09-25华南理工大学Windows desktop control method based on intelligent mobile terminals

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
肖邦卫 等: "《电算化会计》", 31 August 1998, 南昌:江西科学技术出版社*

Similar Documents

PublicationPublication DateTitle
CN102253753B (en)Motion component dominance factors for motion locking of touch sensor data
US8847978B2 (en)Information processing apparatus, information processing method, and information processing program
CN102004576B (en)Information processing apparatus, information processing method, and program
CN102109922B (en)Information processing apparatus and control method therefor
US10216352B2 (en)Method, device, and storage medium for selecting content of a webpage through automatically scrolling webpage content
JP6013623B2 (en) Touch sensor control device, touch panel system, electronic information equipment
CN101482784A (en)Motion component dominance factor for motion locking of touch sensor data
CN202904550U (en)Information process device
CN104238768A (en)Handwriting input apparatus and control method
JP2014092808A (en)Electronic device and drawing method
JP2016224834A (en)Electronic device and control method thereof
CN106201234A (en)The inspection method of content of pages and device
US10552532B2 (en)Techniques to present a dynamic formula bar in a spreadsheet
KR20140091302A (en)Method and apparatus for displaying scrolling information in electronic device
CN102955661A (en)Method and apparatus for navigating content on screen using pointing device
KR20130097491A (en)Device and method for changing size of display window on screen
KR101361410B1 (en)Web management device, web management method, computer readable recording medium for recording web management program, and web system
TWI691889B (en)Electronic device and method for displaying icons
US9244567B2 (en)Electronic apparatus, calibration method and storage medium
CN104285204A (en)Display device, display control method and non-temporary computer-readable medium
CN102947788A (en)Terminal, process selection method, control program, and recording medium
JP6411067B2 (en) Information processing apparatus and input method
CN108132719A (en)The implementation method and device of mouse roller based on vxworks operating system
CN103645855A (en)Touch reading method and device
CN105511772B (en) Method, device and mobile terminal for triggering buttons on touch screen by gesture operation

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
CB02Change of applicant information
CB02Change of applicant information

Address after:100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant after:Loongson Zhongke Technology Co.,Ltd.

Address before:100095 Building 2, Longxin Industrial Park, Zhongguancun environmental protection technology demonstration park, Haidian District, Beijing

Applicant before:LOONGSON TECHNOLOGY Corp.,Ltd.

RJ01Rejection of invention patent application after publication
RJ01Rejection of invention patent application after publication

Application publication date:20180608


[8]ページ先頭

©2009-2025 Movatter.jp