當(dāng)你有兩臺(tái)電腦同時(shí)需要使用的時(shí)候坐昙,就會(huì)發(fā)現(xiàn)多個(gè)鼠標(biāo)鍵盤操作起來特別繁瑣,有沒有一個(gè)軟件可以實(shí)現(xiàn)多個(gè)主機(jī)共用一套鼠標(biāo)鍵盤,去搜索了一下,嘿嘿漠吻,發(fā)現(xiàn)可以使用synergy實(shí)現(xiàn)這個(gè)功能
synergy介紹
synergy分為服務(wù)端和客戶端,安裝synergy的時(shí)候可以指定是服務(wù)端或客戶端司恳,服務(wù)器端的鼠標(biāo)鍵盤就可以用來控制客戶端主機(jī)途乃,同時(shí)共用剪貼板。使用時(shí)請(qǐng)確認(rèn)所有的主機(jī)在同一個(gè)lan下扔傅,比如連接同一個(gè)WiFi耍共。
環(huán)境
我有兩臺(tái)Windows烫饼,一臺(tái)是個(gè)人筆記本(windows7),一臺(tái)是公司筆記本(windows10)
下載synergy
- windows版下載鏈接
- linux版下載鏈接:
synergy安裝(Windows)
-
服務(wù)端(ip為192.168.1.6)
安裝后的界面:
image
激活按鈕:
image
激活碼生成
- 瀏覽器打開http://cpp.sh/
- 輸入以下代碼
// Example program
#include<fstream>
#include <iostream>
#include<algorithm>
#include<vector>
#include<climits>
#include<sstream>
#include<iomanip>
#include<stdexcept>
#include <string>
static std::string
hexEncode (std::string const& str) {
std::ostringstream oss;
for (size_t i = 0; i < str.size(); ++i) {
unsigned c = str[i];
c %= 256;
oss << std::setfill('0') << std::hex << std::setw(2)
<< std::uppercase;
oss << c;
}
return oss.str();
}
int main()
{
std::ostringstream oss;
oss << "{v1;pro;AVV;5;avv@avv.com;AV Computer;0;0}";
std::cout << hexEncode(oss.str());
}
-
點(diǎn)擊run
image 輸出結(jié)果
7B76313B70726F3B4156563B353B617676406176762E636F6D3B415620436F6D70757465723B303B307D
客戶端配置
-
客戶端(ip為192.168.1.5)
服務(wù)端IP根據(jù)實(shí)際情況填寫
image
設(shè)置服務(wù)端
image
結(jié)果驗(yàn)證
如果設(shè)置正呈远粒可以拖動(dòng)鼠標(biāo)到另外一臺(tái)主機(jī)杠纵。
或者可以嘗試在服務(wù)端主機(jī)復(fù)制一段文字,然后在客戶端嘗試黏貼钩骇。