-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswap-mouse-buttons.cpp
More file actions
36 lines (30 loc) · 953 Bytes
/
swap-mouse-buttons.cpp
File metadata and controls
36 lines (30 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <cstdlib>
int main() {
int opcio;
do {
system("clear");
std::cout << std::endl << std::endl << "Options:" << std::endl;
std::cout << " 1 to set to default" << std::endl;
std::cout << " 2 to reverse left and right click" << std::endl << std::endl;
std::cout << " Or any key to exit" << std::endl << std::endl << std::endl;
std::cin >> opcio;
if (opcio == 1) {
system("sudo xmodmap -e 'pointer = 1 2 3'");
std::cout << "Alright homie, it's done" << std::endl;
std::cout << "Press any key to continue" << std::endl << std::endl;
std::cin.get();
std::cin.get();
}
else if (opcio == 2) {
system("sudo xmodmap -e 'pointer = 3 2 1'");
std::cout << "Alright homie, it's done" << std::endl << std::endl;
std::cout << "Press any key to continue" << std::endl << std::endl;
std::cin.get();
std::cin.get();
}
else {
return 0;
}
} while(opcio != 1 || opcio != 2);
}