Summary of the invention
Disclosure embodiment provides a kind of method and the device that connect external equipment.Described technical scheme is as follows:
According to the first aspect of disclosure embodiment, a kind of method connecting external equipment is provided, comprises:
Whether the input/output port of monitoring described terminal is connected with external equipment;
When the input/output port monitoring described terminal is connected with external equipment, obtained the input signal of described external equipment transmission by described input/output port;
Perform the operation that described input signal is corresponding.
In one embodiment, described input/output port comprises at least one in wired input/output port, wireless input/output port.
In one embodiment, when described input/output port comprises described wired input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Whether wired input/output port of monitoring described terminal is connected with external equipment by connecting line.
In one embodiment, described wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, when described input/output port comprises described wireless input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Monitor described terminal and whether be connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
In one embodiment, described external equipment comprises at least one equipment following: keyboard, mouse.
In one embodiment, when described external equipment comprises keyboard, the operation that the described input signal of described execution is corresponding, comprising:
The key assignments information keyed on said keyboard is obtained from the input signal that described keyboard sends;
Described key assignments information is sent in input method application program.
In one embodiment, when described external equipment comprises mouse, the operation that the described input signal of described execution is corresponding, comprising:
Obtain described terminal current screen upstream target locating information according to the input signal that described mouse sends;
Vernier described in the position display that described locating information is corresponding on described terminal current screen;
Or
The input signal sent according to described mouse obtain to vernier on described terminal current screen the operation information of screen elements through position;
Operation corresponding to described operation information is performed to described screen elements.
According to the second aspect of disclosure embodiment, a kind of device connecting external equipment is provided, comprises:
Whether monitoring modular, be connected with external equipment for the input/output port of monitoring described terminal;
Acquisition module, during for being connected with external equipment when the input/output port monitoring described terminal, obtains the input signal of described external equipment transmission by described input/output port;
Execution module, for performing operation corresponding to described input signal.
In one embodiment, described monitoring modular comprises:
First monitoring submodule, for when described input/output port comprises described wired input/output port, whether wired input/output port of monitoring described terminal is connected with external equipment by connecting line.
In one embodiment, described monitoring modular comprises:
Second monitoring submodule, for comprising described wireless input/output port when described input/output port, when described wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, monitor described terminal and whether be connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
In one embodiment, described execution module comprises:
First obtains submodule, for when described external equipment comprises keyboard, obtains the key assignments information keyed on said keyboard from the input signal that described keyboard sends;
Send submodule, for described key assignments information being sent in input method application program.
In one embodiment, described execution module comprises:
Second obtains submodule, for when described external equipment comprises mouse, obtains described terminal current screen upstream target locating information according to the input signal that described mouse sends;
Display sub-module, for vernier described in the position display that described locating information on described terminal current screen is corresponding;
3rd obtains submodule, for when described external equipment comprises mouse, the input signal acquisition sent according to described mouse to vernier on described terminal current screen the operation information of screen elements through position;
Implementation sub-module, for performing operation corresponding to described operation information to described screen elements.
According to the third aspect of disclosure embodiment, a kind of device connecting external equipment is provided, comprises:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
Whether the input/output port of monitoring described terminal is connected with external equipment;
When the input/output port monitoring described terminal is connected with external equipment, obtained the input signal of described external equipment transmission by described input/output port;
Perform the operation that described input signal is corresponding.
The technical scheme that embodiment of the present disclosure provides can comprise following beneficial effect:
This technical scheme establishes the connection between terminal and external equipment, make user directly can replace the input in terminal by operation external equipment, thus the input improving user is experienced, solve simultaneously terminal screen keyboard too little and cause input error, selection key difficulty etc. problem, and then improve the work efficiency of user, for user brings convenience.
Should be understood that, it is only exemplary and explanatory that above general description and details hereinafter describe, and can not limit the disclosure.
Embodiment
Here will be described exemplary embodiment in detail, its sample table shows in the accompanying drawings.When description below relates to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawing represents same or analogous key element.Embodiment described in following exemplary embodiment does not represent all embodiments consistent with the disclosure.On the contrary, they only with as in appended claims describe in detail, the example of apparatus and method that aspects more of the present disclosure are consistent.
In the technical scheme that disclosure embodiment provides, the terminal related to can be the terminal device that mobile phone, panel computer, personal computer etc. can connect external equipment.
Fig. 1 is a kind of process flow diagram connecting the method for external equipment according to an exemplary embodiment, and as shown in Figure 1, the method for this connection external equipment is used for, in terminal, comprising the following steps S11-S13.
In step s 11, whether the input/output port of monitoring terminal is connected with external equipment.
Wherein, external equipment can be keyboard, mouse, game paddle etc.; Input/output port comprises at least one in wired input/output port, wireless input/output port, and for different input/output port, the embodiment of this step is different.When input/output port comprises wired input/output port, this step S11 can perform as following steps A1: in steps A 1, and whether wired input/output port of monitoring terminal is connected with external equipment by connecting line, such as OTG connecting line; When input/output port comprises wireless input/output port, wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, then this step S11 can perform as following steps A2: in steps A 2, and whether monitoring terminal is connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
In step s 12, when the input/output port monitoring terminal is connected with external equipment, obtained the input signal of external equipment transmission by input/output port.
In step s 13, operation corresponding to input signal is performed.
Adopt the technical scheme that disclosure embodiment provides, establish the connection between terminal and external equipment, make user directly can replace the input in terminal by operation external equipment, thus the input improving user is experienced, solve simultaneously terminal screen keyboard too little and cause input error, selection key difficulty etc. problem, and then improve the work efficiency of user, for user brings convenience.
When external equipment comprises keyboard, as shown in Figure 2, said method may be embodied as following steps S21-S24.
In the step s 21, whether the input/output port of monitoring terminal is connected with keyboard.Keyboard can be connected in the input/output port of terminal by OTG connecting line or the wireless technology such as bluetooth, wifi, and concrete connected mode can be determined according to the type of input/output port.
In step S22, when the input/output port monitoring terminal is connected with keyboard, obtained the input signal of keyboard transmission by input/output port.Wherein, the input signal that keyboard sends can be the signal of any button on keyboard, comprises function key, character keys etc.
In step S23, from the input signal that keyboard sends, obtain the key assignments information keyed at keyboard.
In step s 24 which, key assignments information is sent in input method application program.
In the present embodiment, step S23-S24 is a kind of embodiment of step S13 in above-described embodiment.By being connected in terminal outside keyboard, user can directly be operated on external keyboard, thus replace the input on terminal keyboard, the input not only increasing user is experienced, also solve simultaneously terminal screen keyboard too little and cause input error, selection key difficulty etc. problem, and then improve the work efficiency of user, for user brings convenience.Such as, user wants on mobile phone, use word to handle official business, because the keyboard on mobile phone is too little, very inconvenient during user inputs character, be easy to input error, or easily select the button etc. near correct button, if by mobile phone external keyboard, so user just can use external keyboard to input, thus completes the office on mobile phone fast.In addition, the present embodiment is not limited to and improves user's efficiency of handling official business on mobile phone, also comprises the situation that other needs input on cell phone keyboard, such as on mobile phone replied mail, chat, send short messages.
When external equipment comprises mouse, said method may be embodied as the step S31-S44 shown in the step S31-S34 shown in Fig. 3 or Fig. 4.
In step S31, whether the input/output port of monitoring terminal is connected with mouse.Mouse can be connected in the input/output port of terminal by OTG connecting line or the wireless technology such as bluetooth, wifi, and concrete connected mode can be determined according to the type of input/output port.
In step s 32, when the input/output port monitoring terminal is connected with mouse, obtained the input signal of mouse transmission by input/output port.Wherein, the input signal that mouse sends can be the operating result signal of any operation on mouse, comprise click, double-click, the operation such as dragging.
After this step, the difference of the input signal that terminal sends according to mouse, performs different operations.When the locating information of bag vernier in the input signal that mouse sends, after executing above-mentioned steps S31-S32, continue to perform following steps S33-S34.When the input signal that mouse sends comprises the operation information to screen elements, after executing above-mentioned steps S31-S32, continue to perform following steps S43-S44.
In step S33, obtain terminal current screen upstream target locating information according to the input signal that mouse sends.
In step S34, the position display vernier that locating information is corresponding on terminal current screen.
In step S43, the input signal sent according to mouse obtain to vernier on terminal current screen the operation information of screen elements through position.Wherein, vernier on screen the position of process can realize choosing operation to screen elements, to vernier on terminal current screen the operation information of screen elements through position can comprise deletion action information, replicate run information etc. to chosen screen elements.
In step S44, the operation corresponding to screen elements executable operations information.
In the present embodiment, step S33-S34 and step S43-S44 is respectively two kinds of embodiments of step S13 in above-described embodiment.By being connected in terminal outside mouse, user can directly be operated on external mouse, thus replace the input on terminal keyboard, the input not only increasing user is experienced, also solve simultaneously terminal screen keyboard too little and cause input error, selection key difficulty etc. problem, and then improve the work efficiency of user, for user brings convenience.
Following is disclosure device embodiment, may be used for performing disclosure embodiment of the method.
Fig. 5 is a kind of device block diagram connecting external equipment according to an exemplary embodiment, and this device can realize becoming the some or all of of electronic equipment by software, hardware or both combinations.With reference to Fig. 5, this device comprises:
Whether the input/output port that monitoring modular 51 is configured to monitor described terminal is connected with external equipment.
Acquisition module 52 is configured to when the input/output port monitoring described terminal is connected with external equipment, is obtained the input signal of described external equipment transmission by input/output port.
Execution module 53 is configured to perform operation corresponding to described input signal.
In one embodiment, as shown in Figure 6, monitoring modular 51 comprises:
First monitoring submodule 511 is configured to when input/output port comprises wired input/output port, and whether wired input/output port of monitoring described terminal is connected with external equipment by connecting line.
Second monitoring submodule 512 is configured to comprise wireless input/output port when input/output port, when wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, monitor described terminal device and whether be connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
In one embodiment, as shown in Figure 7, execution module 53 comprises:
Second obtains submodule 531 is configured to when described external equipment comprises mouse, obtains described terminal current screen upstream target locating information according to the input signal that described mouse sends.
Display sub-module 532 is configured to vernier described in described locating information is corresponding on described terminal current screen position display.
3rd obtains submodule 533 is configured to when described external equipment comprises mouse, the input signal acquisition sent according to described mouse to vernier on described terminal current screen the operation information of screen elements through position.
Implementation sub-module 534 is configured to perform operation corresponding to described operation information to described screen elements.
Adopt the device that disclosure embodiment provides, establish the connection between terminal and external equipment, make user directly can replace the input in terminal by operation external equipment, thus the input improving user is experienced, solve simultaneously terminal screen keyboard too little and cause input error, selection key difficulty etc. problem, and then improve the work efficiency of user, for user brings convenience.
In the exemplary embodiment, disclosure embodiment also provides a kind of device connecting external equipment, comprising:
Processor;
For the storer of storage of processor executable instruction;
Wherein, described processor is configured to:
Whether the input/output port of monitoring described terminal is connected with external equipment;
When the input/output port monitoring described terminal is connected with external equipment, obtained the input signal of described external equipment transmission by described input/output port;
Perform the operation that described input signal is corresponding.
Above-mentioned processor also can be configured to:
Described input/output port comprises at least one in wired input/output port, wireless input/output port.
Above-mentioned processor also can be configured to:
When described input/output port comprises described wired input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Whether wired input/output port of monitoring described terminal is connected with external equipment by connecting line.
Above-mentioned processor also can be configured to:
Described wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, when described input/output port comprises described wireless input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Monitor described terminal and whether be connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
Above-mentioned processor also can be configured to:
Described external equipment comprises at least one equipment following: keyboard, mouse.
Above-mentioned processor also can be configured to:
When described external equipment comprises keyboard, the operation that the described input signal of described execution is corresponding, comprising:
The key assignments information keyed on said keyboard is obtained from the input signal that described keyboard sends;
Described key assignments information is sent in input method application program.
Above-mentioned processor also can be configured to:
When described external equipment comprises mouse, the operation that the described input signal of described execution is corresponding, comprising:
Obtain described terminal current screen upstream target locating information according to the input signal that described mouse sends;
Vernier described in the position display that described locating information is corresponding on described terminal current screen;
Or
The input signal sent according to described mouse obtain to vernier on described terminal current screen the operation information of screen elements through position;
Operation corresponding to described operation information is performed to described screen elements.
About the device in above-described embodiment, wherein the concrete mode of modules executable operations has been described in detail in about the embodiment of the method, will not elaborate explanation herein.
Fig. 8 be according to an exemplary embodiment a kind of for connect external equipment the block diagram of device 800.Such as, device 800 can be mobile phone, computing machine, digital broadcast terminal, messaging devices, game console, tablet device, Medical Devices, body-building equipment, personal digital assistant etc.
With reference to Fig. 8, device 800 can comprise following one or more assembly: processing components 802, storer 804, power supply module 806, multimedia groupware 808, audio-frequency assembly 810, the interface 812 of I/O (I/O), sensor module 814, and communications component 816.
The integrated operation of the usual control device 800 of processing components 802, such as with display, call, data communication, camera operation and record operate the operation be associated.Treatment element 802 can comprise one or more processor 820 to perform instruction, to complete all or part of step of above-mentioned method.In addition, processing components 802 can comprise one or more module, and what be convenient between processing components 802 and other assemblies is mutual.Such as, processing element 802 can comprise multi-media module, mutual with what facilitate between multimedia groupware 808 and processing components 802.
Storer 804 is configured to store various types of data to be supported in the operation of equipment 800.The example of these data comprises for any application program of operation on device 800 or the instruction of method, contact data, telephone book data, message, picture, video etc.Storer 804 can be realized by the volatibility of any type or non-volatile memory device or their combination, as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), programmable read only memory (PROM), ROM (read-only memory) (ROM), magnetic store, flash memory, disk or CD.
The various assemblies that electric power assembly 806 is device 800 provide electric power.Electric power assembly 806 can comprise power-supply management system, one or more power supply, and other and the assembly generating, manage and distribute electric power for device 800 and be associated.
Multimedia groupware 808 is included in the screen providing an output interface between described device 800 and user.In certain embodiments, screen can comprise liquid crystal display (LCD) and touch panel (TP).If screen comprises touch panel, screen may be implemented as touch-screen, to receive the input signal from user.Touch panel comprises one or more touch sensor with the gesture on sensing touch, slip and touch panel.Described touch sensor can the border of not only sensing touch or sliding action, but also detects the duration relevant to described touch or slide and pressure.In certain embodiments, multimedia groupware 808 comprises a front-facing camera and/or post-positioned pick-up head.When equipment 800 is in operator scheme, during as screening-mode or video mode, front-facing camera and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and post-positioned pick-up head can be fixing optical lens systems or have focal length and optical zoom ability.
Audio-frequency assembly 810 is configured to export and/or input audio signal.Such as, audio-frequency assembly 810 comprises a microphone (MIC), and when device 800 is in operator scheme, during as call model, logging mode and speech recognition mode, microphone is configured to receive external audio signal.The sound signal received can be stored in storer 804 further or be sent via communications component 816.In certain embodiments, audio-frequency assembly 810 also comprises a loudspeaker, for output audio signal.
I/O interface 812 is for providing interface between processing components 802 and peripheral interface module, and above-mentioned peripheral interface module can be keyboard, some striking wheel, button etc.These buttons can include but not limited to: home button, volume button, start button and locking press button.
Sensor module 814 comprises one or more sensor, for providing the state estimation of various aspects for device 800.Such as, sensor module 814 can detect the opening/closing state of equipment 800, the relative positioning of assembly, such as described assembly is display and the keypad of device 800, the position of all right pick-up unit 800 of sensor module 814 or device 800 1 assemblies changes, the presence or absence that user contacts with device 800, the temperature variation of device 800 orientation or acceleration/deceleration and device 800.Sensor module 814 can comprise proximity transducer, be configured to without any physical contact time detect near the existence of object.Sensor module 814 can also comprise optical sensor, as CMOS or ccd image sensor, for using in imaging applications.In certain embodiments, this sensor module 814 can also comprise acceleration transducer, gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 816 is configured to the communication being convenient to wired or wireless mode between device 800 and other equipment.Device 800 can access the wireless network based on communication standard, as WiFi, 2G or 3G, or their combination.In one exemplary embodiment, communication component 816 receives from the broadcast singal of external broadcasting management system or broadcast related information via broadcast channel.In one exemplary embodiment, described communication component 816 also comprises near-field communication (NFC) module, to promote junction service.Such as, can based on radio-frequency (RF) identification (RFID) technology in NFC module, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, bluetooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 800 can be realized, for performing said method by one or more application specific integrated circuit (ASIC), digital signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD) (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components.
In the exemplary embodiment, additionally provide a kind of non-transitory computer-readable recording medium comprising instruction, such as, comprise the storer 804 of instruction, above-mentioned instruction can perform said method by the processor 820 of device 800.Such as, described non-transitory computer-readable recording medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc.
A kind of non-transitory computer-readable recording medium, when the instruction in described storage medium is performed by the processor of device 800, make device 800 can perform a kind of method connecting external equipment, described method comprises:
Whether the input/output port of monitoring described terminal is connected with external equipment;
When the input/output port monitoring described terminal is connected with external equipment, obtained the input signal of described external equipment transmission by described input/output port;
Perform the operation that described input signal is corresponding.
Described input/output port comprises at least one in wired input/output port, wireless input/output port.
When described input/output port comprises described wired input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Whether wired input/output port of monitoring described terminal is connected with external equipment by connecting line.
Described wireless input/output port comprises at least one in bluetooth input/output port, wifi input/output port, when described input/output port comprises described wireless input/output port, whether the input/output port of the described terminal of described monitoring is connected with external equipment, comprising:
Monitor described terminal and whether be connected with external equipment by least one in bluetooth input/output port, wifi input/output port.
Described external equipment comprises at least one equipment following: keyboard, mouse.
When described external equipment comprises keyboard, the operation that the described input signal of described execution is corresponding, comprising:
The key assignments information keyed on said keyboard is obtained from the input signal that described keyboard sends;
Described key assignments information is sent in input method application program.
When described external equipment comprises mouse, the operation that the described input signal of described execution is corresponding, comprising:
Obtain described terminal current screen upstream target locating information according to the input signal that described mouse sends;
Vernier described in the position display that described locating information is corresponding on described terminal current screen;
Or
The input signal sent according to described mouse obtain to vernier on described terminal current screen the operation information of screen elements through position;
Operation corresponding to described operation information is performed to described screen elements.
Those skilled in the art, at consideration instructions and after putting into practice disclosure herein, will easily expect other embodiment of the present disclosure.The application is intended to contain any modification of the present disclosure, purposes or adaptations, and these modification, purposes or adaptations are followed general principle of the present disclosure and comprised the undocumented common practise in the art of the disclosure or conventional techniques means.Instructions and embodiment are only regarded as exemplary, and true scope of the present disclosure and spirit are pointed out by claim below.
Should be understood that, the disclosure is not limited to precision architecture described above and illustrated in the accompanying drawings, and can carry out various amendment and change not departing from its scope.The scope of the present disclosure is only limited by appended claim.