mirror of
https://github.com/rbreaves/kinto.git
synced 2025-07-31 16:26:39 +02:00
105
README.md
105
README.md
@@ -28,13 +28,11 @@ Kinto works for standard Windows, Apple and Chromebook keyboards. The following
|
||||
- IBus*
|
||||
- Fedora/RHEL/Manjaro/Arch/Debian/Ubuntu based distro 16.04+
|
||||
|
||||
If you need kintox11 recompiled for your distro please let me know and I will add a binary for your distro if my binary fails.
|
||||
|
||||
You can also attempt to compile kintox11.c on your system as well, but you will need to compile and install json-c first as its libraries will be required to compile and run the program.
|
||||
Binary is included and will be installed, but you can also compile kintox11.c on your system. You will need to compile and install json-c first as its libraries will be required to compile and run the program.
|
||||
|
||||
*IBus is needed to support wordwise during browser app usage as the keymap will need to change slightly depending if the cursor/caret is on screen waiting for input. Setup.py will set it but you can manually set it as well or check your current Input Method.
|
||||
|
||||
To confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
||||
On most distros you can confirm navigate to your "Language Support" and set "Keyboard input method system:" to IBus for full word-wise support with web browsers.
|
||||
|
||||
Wayland support is planned, but not ready yet.
|
||||
|
||||
@@ -63,6 +61,71 @@ To Uninstall Kinto
|
||||
./uninstall.sh
|
||||
```
|
||||
|
||||
## Other Notes Related to Install
|
||||
|
||||
**Manjaro with Gnome there are issues.**
|
||||
|
||||
Please see this ticket for more information.
|
||||
|
||||
https://github.com/rbreaves/kinto/issues/59
|
||||
|
||||
https://wiki.archlinux.org/index.php/IBus
|
||||
|
||||
**For other Arch based distros.**
|
||||
|
||||
Append the following and logoff and back on, but only after running setup.py to install all packages and the kinto service. Please report if there are any difficulties.
|
||||
nano ~/.bashrc
|
||||
```
|
||||
export GTK_IM_MODULE=xim
|
||||
export XMODIFIERS=@im=ibus
|
||||
export QT_IM_MODULE=xim
|
||||
```
|
||||
|
||||
## How to Upgrade Kinto
|
||||
|
||||
Simply bring down the latest in either the master branch or dev, but dev is sometimes in flux as new features are being developed. Then you can re-run the setup.py installer, it will stop the service and re-install Kinto.
|
||||
|
||||
Note: If you have made any custom changes to ~/.xkb or ~/.config/kinto then you will need to backup or rename those directories before running an update.
|
||||
|
||||
```
|
||||
git pull origin master
|
||||
./setup.py
|
||||
```
|
||||
|
||||
## How to Control Kinto
|
||||
|
||||
Under systemd this is how you control Kinto.
|
||||
|
||||
Status
|
||||
```
|
||||
systemctl --user status keyswap
|
||||
```
|
||||
|
||||
Stop (your keymap will return to normal)
|
||||
```
|
||||
systemctl --user stop keyswap
|
||||
```
|
||||
|
||||
Start
|
||||
```
|
||||
systemctl --user start keyswap
|
||||
```
|
||||
|
||||
Restart
|
||||
```
|
||||
systemctl --user restart keyswap
|
||||
```
|
||||
|
||||
Enable
|
||||
```
|
||||
systemctl --user enable keyswap
|
||||
```
|
||||
|
||||
Disable
|
||||
```
|
||||
systemctl --user disable keyswap
|
||||
```
|
||||
|
||||
## How to Add Setxkbmap Option inside Kinto
|
||||
|
||||
To summarize you'll need to pull the partial out of the symbols file the option resides in and then add that to the mac_gui file and lastly reference it in the keymap file(s) you want it in.
|
||||
@@ -354,40 +417,6 @@ You can also add additional Desktop Environment related tweaks to user_config.js
|
||||
}
|
||||
```
|
||||
|
||||
## How to Control Kinto
|
||||
|
||||
Under systemd this is how you control Kinto.
|
||||
|
||||
Status
|
||||
```
|
||||
systemctl --user status keyswap
|
||||
```
|
||||
|
||||
Stop (your keymap will return to normal)
|
||||
```
|
||||
systemctl --user stop keyswap
|
||||
```
|
||||
|
||||
Start
|
||||
```
|
||||
systemctl --user start keyswap
|
||||
```
|
||||
|
||||
Restart
|
||||
```
|
||||
systemctl --user restart keyswap
|
||||
```
|
||||
|
||||
Enable
|
||||
```
|
||||
systemctl --user enable keyswap
|
||||
```
|
||||
|
||||
Disable
|
||||
```
|
||||
systemctl --user disable keyswap
|
||||
```
|
||||
|
||||
## Learning macOS style hotkeys on Linux
|
||||
|
||||
You can use websites like https://www.shortcutfoo.com in Google Chrome while using the terminal style keymap, but Firefox is not compatible due to detecting "cmd" as keycode 224. Chrome detects Win/Super/Cmd as keycode 91 on all OS's.
|
||||
|
Binary file not shown.
@@ -194,7 +194,7 @@ Window get_focus_window(Display* d){
|
||||
// a top window have the following specifications.
|
||||
// * the start window is contained the descendent windows.
|
||||
// * the parent window is the root window.
|
||||
Window get_top_window(Display* d, Window start){
|
||||
Window get_top_window(Display* d, Window start, int etype, int last_event, char const *current_app){
|
||||
Window w = start;
|
||||
Window parent = start;
|
||||
Window root = None;
|
||||
@@ -202,22 +202,27 @@ Window get_top_window(Display* d, Window start){
|
||||
unsigned int nchildren;
|
||||
Status s;
|
||||
|
||||
while (parent != root && parent != 0) {
|
||||
// Checking for Destroy and Unmap Notify events here too
|
||||
// Sometimes they still get passed through and if so need
|
||||
// to be ignored or XQueryTree will cause a segmentation fault
|
||||
while (parent != root && parent != 0 && !(etype == 17 || etype == 18)) {
|
||||
w = parent;
|
||||
|
||||
s = XQueryTree(d, w, &root, &parent, &children, &nchildren); // see man
|
||||
|
||||
if (s)
|
||||
XFree(children);
|
||||
|
||||
if(xerror){
|
||||
printf("fail to get top window: %ld\n",w);
|
||||
exit(1);
|
||||
printf("fail to get top window: %ld, e.type: %d, last_event: %d, current_app: %s\n",w,etype,last_event, current_app);
|
||||
break;
|
||||
}
|
||||
|
||||
// printf(" get parent (window: %d)\n", (int)w);
|
||||
}
|
||||
|
||||
// printf("success (window: %d)\n", (int)w);
|
||||
// printf("hello\n");
|
||||
|
||||
return w;
|
||||
}
|
||||
@@ -431,7 +436,7 @@ int main(void){
|
||||
|
||||
// get active window
|
||||
w = get_focus_window(d);
|
||||
w = get_top_window(d, w);
|
||||
w = get_top_window(d, w, 0, 0, current_app);
|
||||
w = get_named_window(d, w);
|
||||
|
||||
// XFetchName(d, w, &name);
|
||||
@@ -546,8 +551,35 @@ int main(void){
|
||||
}
|
||||
}
|
||||
|
||||
// if(strcicmp(current_app, "plasmashell") == 0){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
// if(strcicmp(current_app, "plasmashell") == 0 && e.type == 18 && last_event == 22){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
// if(strcicmp(prior_app, "plasmashell") == 0){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
// if(strcicmp(current_app, "dolphin") == 0){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
// if(strcicmp(prior_app, "dolphin") == 0){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
// if(strcicmp(current_app, "dolphin") == 0 && e.type == 18 && last_event == 16){
|
||||
// XNextEvent(d, &e);
|
||||
// }
|
||||
|
||||
// Reference http://www.rahul.net/kenton/xproto/xevents_errors.html
|
||||
// event type 17 - DestroyNotify
|
||||
// event type 18 - UnmapNotify
|
||||
// Dismiss the following events by initiating another XNextEvent
|
||||
while(e.type == 17 || e.type == 18){
|
||||
XNextEvent(d, &e);
|
||||
}
|
||||
|
||||
w = get_focus_window(d);
|
||||
w = get_top_window(d, w);
|
||||
w = get_top_window(d, w, e.type, last_event, current_app);
|
||||
w = get_named_window(d, w);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user