Compare commits
3 Commits
02f2aa88ad
...
c9914b7827
| Author | SHA1 | Date | |
|---|---|---|---|
| c9914b7827 | |||
| 3ec40ce451 | |||
| 22b6e5a39e |
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
+15
-20
@@ -22,30 +22,25 @@ typedef enum Key {
|
|||||||
Count_Key
|
Count_Key
|
||||||
} Key;
|
} Key;
|
||||||
|
|
||||||
bool KeyIsDown(Key key);
|
typedef uint32_t CodePoint;
|
||||||
bool KeyIsUp(Key key);
|
|
||||||
bool KeyIsJustPressedOrRepeat(Key key);
|
|
||||||
bool KeyIsJustPressed(Key key);
|
|
||||||
bool KeyIsJustReleased(Key key);
|
|
||||||
bool InputGetNextPrintable(char const *out_key);
|
|
||||||
|
|
||||||
typedef struct Screen {
|
bool KeyPressed(Key key);
|
||||||
void *handle;
|
bool InputGetNextPrintable(CodePoint const *out_key);
|
||||||
} Screen;
|
|
||||||
|
|
||||||
typedef struct Window {
|
typedef struct Window {
|
||||||
int width;
|
int const width;
|
||||||
int height;
|
int const height;
|
||||||
void *handle;
|
CodePoint *characters;
|
||||||
Screen screen;
|
Color *foreground;
|
||||||
|
Color *background;
|
||||||
} Window;
|
} Window;
|
||||||
|
|
||||||
Screen ScreenGetFocused();
|
Window *WindowCreate();
|
||||||
int ScreenGetWidth(Screen screen);
|
void WindowClear(Window *window, Color color);
|
||||||
int ScreenGetHeight(Screen screen);
|
void WindowFlip(Window *window);
|
||||||
// Make a window specifically suitable for tools like launchers.
|
|
||||||
// Always on top, not resizable, closes on lost focus.
|
// TODO: the platform layer would really update the keys being pressed, and
|
||||||
Window ScreenMakeStaticWindow(int x, int y, int pixel_width, int pixel_height);
|
// receive a diff in the form of actions. print this line from here and change
|
||||||
void WindowClear(Color color);
|
// colors at these points.
|
||||||
|
|
||||||
#endif /* PLATFORM */
|
#endif /* PLATFORM */
|
||||||
|
|||||||
+15
-16
@@ -35,25 +35,24 @@
|
|||||||
"type": "basic"
|
"type": "basic"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "swap alt and cmd",
|
|
||||||
"enabled": false,
|
|
||||||
"manipulators": [
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_option" },
|
|
||||||
"to": [{ "key_code": "left_command" }],
|
|
||||||
"type": "basic"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"from": { "key_code": "left_command" },
|
|
||||||
"to": [{ "key_code": "left_option" }],
|
|
||||||
"type": "basic"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"devices": [
|
||||||
|
{
|
||||||
|
"identifiers": {
|
||||||
|
"is_keyboard": true,
|
||||||
|
"product_id": 21042,
|
||||||
|
"vendor_id": 1155
|
||||||
|
},
|
||||||
|
"simple_modifications": [
|
||||||
|
{
|
||||||
|
"from": { "key_code": "grave_accent_and_tilde" },
|
||||||
|
"to": [{ "key_code": "non_us_backslash" }]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
"name": "KarabinerTS",
|
"name": "KarabinerTS",
|
||||||
"selected": true,
|
"selected": true,
|
||||||
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
"virtual_hid_keyboard": { "keyboard_type_v2": "iso" }
|
||||||
Reference in New Issue
Block a user