Compare commits

..

8 Commits

Author SHA1 Message Date
Ben Reaves
87ca8e7566 Merge pull request #75 from rbreaves/hotfix
- Recompiled kintox11.c a 2nd time
2020-03-30 18:49:20 -05:00
Ben Reaves
0e4160622f - Recompiled kintox11.c a 2nd time 2020-03-30 18:47:10 -05:00
Ben Reaves
564360e9fa Merge pull request #73 from rbreaves/hotfix
- Recompiled binary with static json-c
2020-03-30 17:25:02 -05:00
Ben Reaves
91e692c76b - Recompiled binary with static json-c 2020-03-30 17:24:23 -05:00
Ben Reaves
6c46696bd4 Merge pull request #71 from rbreaves/hotfix
- Fixed BadWindow errors caused by Destroy and UnmapNotify in Xlib
2020-03-30 16:25:22 -05:00
Ben Reaves
40c8d20513 - Fixed BadWindow errors caused by Destroy and UnmapNotify in Xlib 2020-03-30 16:10:00 -05:00
Ben Reaves
6b6e448e76 Updated readme with arrows to make it more clear. 2020-03-29 01:26:29 -05:00
Ben Reaves
f73a2c8420 Updated readme to include new animation 2020-03-29 00:52:18 -05:00
3 changed files with 42 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
# Kinto
![kinto_carrot](https://user-images.githubusercontent.com/10969616/77842401-4744b500-7157-11ea-854a-d7dec6f9a250.gif)
![alt text](https://raw.githubusercontent.com/rbreaves/kinto/master/Kinto.png)
[![GitHub release](https://img.shields.io/github/release/rbreaves/kinto.svg)](https://github.com/rbreaves/kinto/releases/latest)
![alt text](https://github.com/rbreaves/kinto/blob/master/splash.png)
\- Type in Linux like it's a Mac. \-
Seamless copy and paste with all apps and terminals. Also the only linux remapper that is aware of your cursor/caret status - meaning it avoids shortcut conflicts within an app versus wordwise shortcuts when a text field is in use.
@@ -14,9 +14,9 @@ Seamless copy and paste with all apps and terminals. Also the only linux remappe
Kinto works for standard Windows, Apple and Chromebook keyboards. The following however describes the dynamic rebinding based on a standard Windows keyboard. (Alt location is Cmd for Apple keyboards)
- Normal apps - Alt will be Ctrl, Win/Super will be Alt, Ctrl will be Win/Super
- Normal apps - Alt Ctrl, Win/Super Alt, Ctrl Win/Super
- Terminal apps - Alt will be Ctrl+Shift, Win/Super will be Alt, Ctrl will be Ctrl
- Terminal apps - Alt Ctrl+Shift, Win/Super Alt, Ctrl Ctrl
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.

Binary file not shown.

View File

@@ -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);
}
}