KVM switch for switching among computers by employing mouse movement signal and method thereof

A keyboard-video-mouse (KVM) switch and switching method thereof are disclosed. A KVM switch for switching among a plurality of computers includes a movement detector, control unit, and a switch unit. The movement detector detects a movement of a mouse to generate a movement signal. The control unit receives the movement signal from the movement detector and generates a control signal according to the movement signal. The switch unit switches the computers based on the control signal. The KVM performs switch operation among a plurality of computers by a switching threshold value according to a movement distance of a mouse during a set time period.

FIELD OF THE INVENTION

The present invention relates to a keyboard-video-mouse (KVM) switch, and more particularly to a KVM switch for switching among a plurality of computers to select one of the computers by employing a mouse movement signal and switching method thereof.

BACKGROUND OF THE INVENTION

A keyboard-video-mouse (KVM) switch has been developed as an important solution for allowing a user to manage a plurality of computers via a console station, including a video monitor, keyboard, and mouse. Further, KVM cables are utilized to connect the KVM switch to each computer. The KVM switch enables the keyboard, video monitor and mouse to control more than one computer at a time. Basically, the user utilizes the video monitor, keyboard, and mouse to operate a currently selected computer, and utilizes a hot key on the keyboard or a port-selecting button on the KVM switch to switch the currently selected computer to a next selectable computer. The KVM switch transmits the switch signals among the computers and the video monitor, keyboard, and mouse depending on which computer is currently selected.

However, it is still inconvenient that the user must remember the hot key or move to press the port-selecting button in order to control the KVM switch. Further, TW patent application NO. 92219775, issued on Oct. 11, 2004, discloses a computer host switch that a control circuit controls a mouse to switch a plurality of computer hosts. However, because three or more keys of the mouse are needed and it is too complicated so that the control circuit cannot easily switch the computer hosts. In addition, the publication document in website: http://www.cctch.com.tw/products/showproduct.jsp?ID=97 discloses a KVM switch of Product ID: IC-A12-M. The KVM switch cannot effectively switch the computers via a mouse because of a complicated mouse clicking manner.

For the convenience of use, there is a need to provide a novel KVM switch for switching a plurality of computers using a mouse.

SUMMARY OF THE INVENTION

One object of the present invention provides a KVM switch to switch among a plurality of computers by a switching threshold value according to a movement distance of a mouse during a set time period.

The KVM switch includes a mouse driver, a bypass circuit, a switch unit, a movement detector, and a control unit. The mouse driver outputs a mouse signal from the mouse to the bypass circuit and the movement detector, respectively. The movement detector detects the movement of the mouse toward a first direction if the mouse is moved from a first side to a second side or toward a second direction if the mouse is moved from the second side to the first side for generating a movement signal and outputting the mouse movement signal to the control unit. Then, the control unit generates a control signal based on the movement signal from the movement detector. The movement detector can be implemented by hardware, firmware or even software. The switch unit switches among the computers to select one of the computers based on the control signal.

Please note that the movement detector can be a hardware circuit integrated into the control unit. Alternatively, the movement detector is a detection function provided to the control unit. The movement detector can be a section of a program executed by the control unit. That is, the control unit is able to detect the movement of the mouse, control the switch to select one of the computers, and route the mouse signal to the selected computer.

The KVM switch further includes a first distance register, a second distance register, and a timer. The timer is used for setting a set time period. During the setting time period, the first distance register accumulates a first movement distance to obtain a first accumulated movement distance if the mouse is moved toward the first direction, and the second distance register accumulates a second movement distance to obtain a second accumulated movement distance if the mouse is moved toward the second direction.

On one hand, if the set time period is expired, the control unit resets the first distance register and the second distance register for clearing the first accumulated movement distance and the second accumulated movement distance therein. Further, if the set time period of the timer is expired, the control unit resets the timer and then the timer times the set time period again. On the other hand, the control unit performs switching operation if the timer times according to the set time period and the timed period is within the set time period, i.e. the timed period does not exceed the set time period of the timer. That is, during the set time period, the control unit controls the switch unit to switch the computers correctly for selecting one of the computers.

The control unit reads the first accumulated movement distance from the first distance register and reads the second accumulated movement distance from the second distance register. The control unit determines that the computers are switched at a first switch direction or a second switch direction by comparing the first accumulated movement distance stored in the first distance register with the second accumulated movement distance stored in the second distance register.

If the comparison result is that the first accumulated movement distance is greater than or equal to the second accumulated movement distance, the control unit compares the first accumulated movement distance with a switching threshold value. If the first accumulated movement distance is greater than or equal to the switching threshold value, the control unit then controls the switch unit to switch from one currently selected computer to a previously selected computer at the first switch direction.

Similarly, if the comparison result is that the first accumulated movement distance is less than the second accumulated movement distance, the control unit compares the second accumulated movement distance with a switching threshold value. If the second accumulated movement distance is greater than or equal to the switching threshold value, the control unit then controls the switch unit to switch from one currently selected computer to a next selectable computer at the second switch direction.

According to the above-mentioned description, the present invention provides a KVM switch to switch among a plurality of computers by a switching threshold value according to a movement distance of a mouse during a set time period. The control unit is capable of detecting the movement of the mouse, controlling the switch to select one of the computers, and routing the mouse signal to the selected computer.

The present invention conveniently utilizes the mouse to switch to one selected computer among the computers and assuredly performs the operation of the selected computer.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

FIG. 1shows a schematic diagram of a KVM switch100according to one embodiment of the present invention. A mouse101is coupled to a plurality of computers107, such as computers107athrough107d, respectively via the KVM switch100. The KVM switch100further includes a mouse driver102, a bypass circuit103, a switch unit104, a movement detector105, and a control unit106. The mouse driver102is coupled to the mouse101. The bypass circuit103is coupled to the mouse driver102. The movement detector105is coupled to the mouse driver102. The control unit106is coupled to the movement detector105. The switch unit104is coupled to the bypass circuit103and control unit106.

The mouse driver102outputs a mouse signal from the mouse101to the bypass circuit103and the movement detector105, respectively. The movement detector105detects the movement of the mouse101toward a first direction if the mouse101is moved from a first side to a second side or toward a second direction if the mouse101is moved from the second side to the first side for generating a movement signal and outputting the mouse movement signal to the control unit106. The first direction may be opposite to the second direction. For example, the mouse101is moved from the left side to the right side for a switch operation. Then, the control unit106generates a control signal based on the movement signal from the movement detector105. The movement detector105can be implemented by hardware, firmware or even software. The switch unit104switches among the computers107athrough107dto select one of the computers107athrough107dbased on the control signal.

Referring toFIG. 1, please note that the movement detector105can be a hardware circuit integrated into the control unit106. Alternatively, the movement detector105is a detection function provided to the control unit106. The movement detector105can be a section of a program executed by the control unit106. That is, the control unit106is able to detect the movement of the mouse101, control the switch104to select one of the computers107athrough107d, and route the mouse signal to the selected computer.

Please refer toFIG. 2which shows a partially detailed schematic diagram of the KVM switch100shown inFIG. 1according to one embodiment of the present invention. The KVM switch100further includes a first distance register201, a second distance register202, and a timer203, which are connected to the control unit106, respectively. The first distance register201and second distance register202are further connected to the movement detector105.

The timer203is used for setting a set time period, e.g. a predetermined time value. During the setting time period, the first distance register201accumulates a first movement distance to obtain a first accumulated movement distance if the mouse101is moved toward the first direction (i.e. from the first side to the second side), and the second distance register202accumulates a second movement distance to obtain a second accumulated movement distance if the mouse101is moved toward the second direction (i.e. from the second side to the first side). In one embodiment, the first distance register201and second distance register202continuously accumulates the first movement distance and second movement distance for allowing the control unit106to calculate movement distance during the set time period when the mouse101is moved toward the first direction or toward the second direction, respectively.

On one hand, if the set time period is expired, the control unit106resets the first distance register201and the second distance register202for clearing the first accumulated movement distance and the second accumulated movement distance therein. Further, if the set time period of the timer203is expired, the control unit106resets the timer203and then the timer203times the set time period again. On the other hand, the control unit106performs switching operation if the timer203times according to the set time period and the timed period is within the set time period, i.e. the timed period does not exceed the set time period of the timer203. That is, during the set time period, the control unit106controls the switch unit104to switch the computers107athrough107dshown inFIG. 1correctly for selecting one of the computers107athrough107d.

The control unit106reads the first accumulated movement distance from the first distance register201and reads the second accumulated movement distance from the second distance register202. The control unit106determines that the computers107athrough107dare switched at a first switch direction or a second switch direction by comparing the first accumulated movement distance stored in the first distance register201with the second accumulated movement distance stored in the second distance register202.

If the comparison result is that the first accumulated movement distance is greater than or equal to the second accumulated movement distance, the control unit106compares the first accumulated movement distance with a switching threshold value. If the first accumulated movement distance is greater than or equal to the switching threshold value, the control unit106then controls the switch unit104to switch from one currently selected computer to a previously selected computer at the first switch direction. Please refer toFIG. 1andFIG. 2. For example, if the first accumulated movement distance stored in the first distance register201is greater than or equal to the switching threshold value, the switch unit104switches the computer107dto one of computer107c, computer107b, and computer107a. That is, the switch unit104backwardly and circularly switches the computers (107athrough107d) by the order of computer107d, computer107c, computer107b, and computer107a.

Similarly, if the comparison result is that the first accumulated movement distance is less than the second accumulated movement distance, the control unit106compares the second accumulated movement distance with a switching threshold value. If the second accumulated movement distance is greater than or equal to the switching threshold value, the control unit106then controls the switch unit104to switch from one currently selected computer to a next selectable computer at the second switch direction. Please refer toFIG. 1andFIG. 2. For example, if the second accumulated movement distance stored in the second distance register202is greater than or equal to the switching threshold value, the switch unit104switches the computer107ato one of computer107a, computer107b, and computer107c. That is, the switch unit104forwardly and circularly switches the computers (107athrough107d) by the order of computer107a, computer107b, computer107c, and computer107d.

According to the above-mentioned description, the present invention provides a KVM switch to switch among a plurality of computers by a switching threshold value according to a movement distance of a mouse during a set time period. The control unit106is capable of detecting the movement of the mouse101, controlling the switch104to select one of the computers107athrough107d, and routing the mouse signal to the selected computer.

Moreover, the control unit106determines whether the movement distance of the mouse101every time is greater than the one-step threshold value. If the movement distance of the mouse101is greater than or equal to the single distance threshold value, the control unit106recognizes that the mouse movement is for switching among the computers. Otherwise, if the movement distance of the mouse101is less than the single distance threshold value, the control unit recognizes that the mouse movement is for other operation (such as moving cursor) in the currently selected computer rather than switching operation.

In one embodiment, if the first accumulated movement distance is greater than or equal to the second accumulated movement distance and, meanwhile, a second movement distance at the second direction opposite to the first direction is detected, the control unit106determines whether the second movement distance is less than a one-step threshold value. If the decision result is “Yes”, the control unit106resets the second distance register202to clear the second accumulated movement distance therein, and the control unit106further resets the timer203and then the timer203times the set time period again for performing a next switching operation of the KVM switch100. Alternatively, if the first accumulated movement distance is less than the second accumulated movement distance and, meanwhile, a first movement distance at the first direction opposite to the second direction is detected, the control unit106determines whether the first movement distance is less than the one-step threshold value. If the decision result is “Yes”, the control unit106resets the first distance register201to clear the first accumulated movement distance, and the control unit106further resets the timer203and then the timer203times the set time period again for performing a next switching of the KVM switch100.

Please refer toFIGS. 1,2,3A,3B and3C.FIGS. 3A,3B and3C show flow charts of performing the KVM switch100shown inFIGS. 1 and 3according to one embodiment of the present invention. The flow charts include the following steps.

In step S300, a KVM switch100performs an initialization procedure.

In step S301, the control unit106resets the first distance register201and second distance register202to clear the first accumulated movement distance and second accumulated movement distance therein, respectively.

In step S302, the control unit106resets the timer203and the timer203times a set time period of the timer203in order to start to perform switching operation of the KVM switch100.

In step S303, the control unit106determines whether the set time period of the timer203is expired. If the decision result is “Yes”, the control unit106resets the timer203, the first distance register201and second distance register202. If the timer203times according to the set time period and the timed period is within the set time period and the timed period does not exceed the set time period of the timer203, i.e. the decision result is “No”, the control unit106determines whether the mouse101is moved toward the first direction (i.e. from the first side to the second side) or toward the second direction (i.e. from the second side to the first side).

In step S304, when the set time period of the timer203is in duration, the control unit106determines whether a first direction is detected by the movement detector105. If the decision result is “Yes”, the control unit106controls the movement detector105for putting the first movement distance into first distance register201. If the decision result is “No” and the first direction is not detected by the movement detector105, go to step S303.

In step S306, the first distance register201continuously accumulates the first movement distance when the decision result in step S304is “Yes”.

In step S305, when the set time period of the timer203is in duration, the control unit106determines a second direction is detected by the movement detector105. If the decision result is “Yes”, the control unit106controls the movement detector105for putting the first movement distance into first distance register201. If the decision result is “No” and the second direction is not detected by the movement detector105, go to step S303.

In step S307, the second distance register202continuously accumulates the second movement distance when the decision result in step S305is “Yes”.

Please refer to theFIG. 3B. In step S308, the control unit106compares the first accumulated movement distance with the second accumulated movement distance to determine that the first accumulated movement distance is greater than or equal to the second accumulated movement distance. If the decision result is “Yes”, proceed to step S309. If the decision result is “No”, proceed to step S1.

In step S309, when the first accumulated movement distance is greater than or equal to the second accumulated movement distance, the control unit106compares first accumulated movement distance with the switching threshold value. If the decision result is “Yes” is step S309, the control unit106then controls the switch unit104to switch from one currently selected computer to a previously selected computer at the first switch direction during the set time period as shown in step S311. If the decision result is “No” in step S309, go to step S303.

In step S310, when the first accumulated movement distance is less than the second accumulated movement distance, the control unit106compares second accumulated movement distance with the switching threshold value. If the decision result is “Yes” in step S310, the control unit106then controls the switch unit104to switch from one currently selected computer to a next selectable computer at the second switch direction during the set time period as shown in step S312. If the decision result is “No” in step S310, go to step S303.

Please refer toFIG. 3C. If the first accumulated movement distance is greater than or equal to the second accumulated movement distance after the step S40, the flow chart further include the following steps.

In step S313, when the first accumulated movement distance is greater than or equal to the second accumulated movement distance and meanwhile a second movement distance at the second direction opposite to the first direction is detected, the control unit106determines whether the second movement distance is less than a one-step threshold value. If the decision result is “Yes”, proceed to steps S315and S317. If the decision result is “No”, go to the step S303.

In step S315, when the decision result in step S313is “Yes”, the control unit106resets the second distance register202to clear the second accumulated movement distance therein.

In step S317, when the decision result in step S313is “Yes”, the control unit106resets the timer203and then the timer203times the set time period again for performing a next switching operation of the KVM switch100.

Please refer toFIG. 3Ccontinuously. If the first accumulated movement distance is less than the second accumulated movement distance after the step S40, the flow chart further include the following steps.

In step S314, when the first accumulated movement distance is less than the second accumulated movement distance and meanwhile a first movement distance at the first direction opposite to the second direction is detected, the control unit106determines whether the first movement distance is less than the one-step threshold value. If the decision result is “Yes”, proceed to steps S316and S318. If the decision result is “No”, go to the step S303.

In step S316, when the decision result in step S314is “Yes”, the control unit106resets the first distance register201to clear the first accumulated movement distance.

In step S318, when the decision result in step S314is “Yes”, the control unit106resets the timer203and then the timer203times the set time period again for performing a next switching of the KVM switch100.