mirror of
https://github.com/rbreaves/kinto.git
synced 2025-08-06 10:58:26 +02:00
Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
87ca8e7566 | ||
![]() |
0e4160622f | ||
![]() |
564360e9fa | ||
![]() |
91e692c76b | ||
![]() |
6c46696bd4 | ||
![]() |
40c8d20513 | ||
![]() |
6b6e448e76 | ||
![]() |
f73a2c8420 |
@@ -1,11 +1,11 @@
|
|||||||
# Kinto
|
# Kinto
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
[](https://github.com/rbreaves/kinto/releases/latest)
|
[](https://github.com/rbreaves/kinto/releases/latest)
|
||||||
|
|
||||||

|
|
||||||
|
|
||||||
\- Type in Linux like it's a Mac. \-
|
\- 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.
|
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)
|
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.
|
- Cursor/word-wise shortcut keys have been added to align with macOS keyboard shortcuts.
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -194,7 +194,7 @@ Window get_focus_window(Display* d){
|
|||||||
// a top window have the following specifications.
|
// a top window have the following specifications.
|
||||||
// * the start window is contained the descendent windows.
|
// * the start window is contained the descendent windows.
|
||||||
// * the parent window is the root window.
|
// * 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 w = start;
|
||||||
Window parent = start;
|
Window parent = start;
|
||||||
Window root = None;
|
Window root = None;
|
||||||
@@ -202,22 +202,27 @@ Window get_top_window(Display* d, Window start){
|
|||||||
unsigned int nchildren;
|
unsigned int nchildren;
|
||||||
Status s;
|
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;
|
w = parent;
|
||||||
|
|
||||||
s = XQueryTree(d, w, &root, &parent, &children, &nchildren); // see man
|
s = XQueryTree(d, w, &root, &parent, &children, &nchildren); // see man
|
||||||
|
|
||||||
if (s)
|
if (s)
|
||||||
XFree(children);
|
XFree(children);
|
||||||
|
|
||||||
if(xerror){
|
if(xerror){
|
||||||
printf("fail to get top window: %ld\n",w);
|
printf("fail to get top window: %ld, e.type: %d, last_event: %d, current_app: %s\n",w,etype,last_event, current_app);
|
||||||
exit(1);
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf(" get parent (window: %d)\n", (int)w);
|
// printf(" get parent (window: %d)\n", (int)w);
|
||||||
}
|
}
|
||||||
|
|
||||||
// printf("success (window: %d)\n", (int)w);
|
// printf("success (window: %d)\n", (int)w);
|
||||||
|
// printf("hello\n");
|
||||||
|
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
@@ -431,7 +436,7 @@ int main(void){
|
|||||||
|
|
||||||
// get active window
|
// get active window
|
||||||
w = get_focus_window(d);
|
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);
|
w = get_named_window(d, w);
|
||||||
|
|
||||||
// XFetchName(d, w, &name);
|
// 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_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);
|
w = get_named_window(d, w);
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user