Mitchell Hashimoto
2b2b23dcf6
apprt/embedded: keycallback should use nomod text to determine key
...
To determine the logical key that was pressed, we previously just
trusted that the translated text would have the right value. But if
modifiers are pressed, the text may not translate.
For example on macOS, Ctrl+C does not produce any text. As a result, we
would fall back to the physical key. On layouts like Dvorak, the
physical key for "C" is "I". This means "Ctrl+C" sequences weren't
working.
Instead, if there is no text or the text doesn't map to a key, we
translate again using no modifiers to try to get the raw text of the
input and then base the key on that.
2023-08-15 11:13:01 -07:00
Mitchell Hashimoto
cbd6a325e9
config: macos-option-as-alt now accepts "left", "right"
2023-08-14 12:50:21 -07:00
Mitchell Hashimoto
e7bb9c60b2
input: expand Mods size, convert everything to use it
2023-08-14 12:31:16 -07:00
Mitchell Hashimoto
5e2fa50d0b
macos-option-as-alt config, handle alt-prefix for charCallback
2023-08-13 14:55:31 -07:00
Mitchell Hashimoto
619d2ade3e
only initialize font discovery mechanism once, cache on App
...
Fontconfig in particular appears unsafe to initialize multiple times.
Font discovery is a singleton object in an application and only ever
accessed from the main thread so we can work around this by only
initializing and caching the font discovery mechanism exactly once on
the app singleton.
2023-08-13 08:01:33 -07:00
Mitchell Hashimoto
d62161e2c3
support preedit text rendering in core and metal
2023-08-11 12:20:48 -07:00
Mitchell Hashimoto
ce4eb2112c
core: get rid of ignore_char, apprt must handle this now
2023-08-11 12:02:01 -07:00
Mitchell Hashimoto
7ea8feea69
apprt/embedded: fix char callback ignore when key is consumed
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
4fe739cae0
core: note when keyCallback processed the input
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
d5df8aea9a
apprt/embedded: handle repeat events
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
d02bf322f8
apprt/embedded: remove old _key api, new only!
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
1e1ad7deb9
macos: use the new self-hosted translation
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
1f4a80aa93
apprt/embedded: keymap state is per surface, not per app
2023-08-11 12:02:00 -07:00
Mitchell Hashimoto
57a527b0c9
macos: detect keyboard layout change and reload the keymap
2023-08-11 12:01:59 -07:00
Mitchell Hashimoto
3d23f26326
input, macos: initial work on keymapper and macos usage of it
2023-08-11 12:01:58 -07:00
Mitchell Hashimoto
688ab84661
apprt/embedded: allow noting that selection clipboard is not supported
2023-08-09 14:52:22 -07:00
Mitchell Hashimoto
afc6a9976f
apprt/embedded: support selection clipboard
2023-08-09 14:29:39 -07:00
Mitchell Hashimoto
42735bd0e0
apprt/embedded: new resources dir api
2023-08-08 09:55:23 -07:00
Kevin Hovsäter
22b8173164
Fix typos
2023-08-08 14:27:34 +02:00
Mitchell Hashimoto
22296b377a
Revert "Merge pull request #244 from mitchellh/alt-as-esc"
...
This reverts commit c139279d479682c17f63d9b57c2d56608d09d16a, reversing
changes made to 4ed21047a734d7c586debe0026e3b6ea90ed1622.
We do want to do this but this broke bindings.
2023-08-07 17:06:40 -07:00
Mitchell Hashimoto
67cbabd605
make keyboard modifiers left/right-aware throughout core
2023-08-07 14:33:56 -07:00
Mitchell Hashimoto
0bb286eeb2
C API for invoking bindings
2023-08-05 14:46:47 -07:00
Thorsten Ball
b56ffa6285
Add config setting to turn non-native fullscreen on or off
2023-08-04 14:12:33 -07:00
Mitchell Hashimoto
9a079bb5b9
background-blur-radius for macOS
2023-07-03 20:43:53 -07:00
Mitchell Hashimoto
338f89679d
apprt: add C API for detecting background transparency per surface
2023-07-03 19:44:06 -07:00
Thorsten Ball
8e464db049
Toggle fullscreen on super/ctrl+return, only macOS for now
...
This fixes or at least is the first step towards #171 :
- it adds `cmd/super + return` as the default keybinding to toggle
fullscreen for currently focused window.
- it adds a keybinding handler to the embedded apprt and then changes
the macOS app to handle the keybinding by toggling currently focused
window.
2023-07-02 20:23:49 +02:00
Thorsten Ball
6ff3f62e3a
macOS: implement cmd+[0-9] to goto tab
...
This is my attempt at fixing #63 . It works! But:
1. The `NotificationCenter` subscription is triggered once for every
open tab. That's obviously wrong. But I'm not sure and could use some
pointers where else to put the subscription. That leads me to...
2. I'm _not_ knowledgable in Swift/AppKit/SwiftUI, so I might have put
the wrong/right things in the wrong/right places. For example: wasn't
sure what's to be handled in Swift and what's to be handled by the
core in Zig.
Would love some pointers :)
2023-07-01 09:08:02 -07:00
Mitchell Hashimoto
314f9287b1
Update Zig ( #164 )
...
* update zig
* pkg/fontconfig: clean up @as
* pkg/freetype,harfbuzz: clean up @as
* pkg/imgui: clean up @as
* pkg/macos: clean up @as
* pkg/pixman,utf8proc: clean up @as
* clean up @as
* lots more @as cleanup
* undo flatpak changes
* clean up @as
2023-06-30 12:15:31 -07:00
Mitchell Hashimoto
68631a1ccd
apprt: plumb through scroll mods to core, don't handle them yet
2023-06-29 10:41:42 -07:00
Mitchell Hashimoto
20f46d5c08
define precision scrolling and momentum structs, C API
2023-06-29 10:38:15 -07:00
Mitchell Hashimoto
f31d6fb8fe
apprt: clean up how apprt initializes surfaces
2023-05-31 21:08:50 -07:00
Mitchell Hashimoto
553e09eff9
apprt/embedded: new surfaces inherit last focused
2023-05-31 19:12:01 -07:00
Mitchell Hashimoto
5acf7eb8fd
apprt/embedded: clipboard value can be null
2023-05-28 10:20:59 -07:00
Mitchell Hashimoto
f36a35ecc9
core: quit flag is reset after tick
2023-03-27 10:10:06 -07:00
Mitchell Hashimoto
4d41b3ff54
Merge pull request #134 from mitchellh/gtk-confirm
...
gtk, macos: show confirmation dialog on surface close with active child process
2023-03-26 10:59:09 -07:00
Mitchell Hashimoto
86c4a8ed7d
apprt/embedded: support new process alive callback on close
2023-03-25 16:41:18 -07:00
Mitchell Hashimoto
decaee61b2
apprt/embedded: support unmapped keys
2023-03-25 15:44:17 -07:00
Mitchell Hashimoto
8d3f40fa41
apprt/embedded: reload config support
2023-03-19 09:50:54 -07:00
Mitchell Hashimoto
ddbc0dc586
apprt/embedded: incorrect function call for new close surface
2023-03-18 19:40:42 -07:00
Mitchell Hashimoto
00c837e0d2
apprt: all implement close surface
2023-03-18 19:25:54 -07:00
Mitchell Hashimoto
04c38ef3b0
macos: change focus callback to use an enum so we can get other dirs
2023-03-11 17:44:00 -08:00
Mitchell Hashimoto
18cf0dc9fc
macos: put next/prev split focus into menu
2023-03-11 17:25:39 -08:00
Mitchell Hashimoto
b582691185
macos: hook up all the bindings so we're ready to handle focus event
2023-03-11 16:22:04 -08:00
Mitchell Hashimoto
f85c1c256c
macos: menu bar to split
2023-03-10 15:24:45 -08:00
Mitchell Hashimoto
a265e7ce20
macos: take over menu bar, separate close and close window
2023-03-10 14:27:55 -08:00
Mitchell Hashimoto
6c857877e8
apprt/embedded: close surface callback
2023-03-08 15:05:15 -08:00
Mitchell Hashimoto
fa9ee0815f
apprt/embedded: newSplit callback
2023-03-08 14:56:50 -08:00
Mitchell Hashimoto
1c3d775d90
apprt/embedded: ignore size callbacks that change nothing
2023-02-26 17:44:45 -08:00
Mitchell Hashimoto
cb412425b2
embedded: fix build
2023-02-24 07:58:30 -08:00
Mitchell Hashimoto
2adb0c9234
apprt: C API for embedded updated to new style
2023-02-24 07:58:29 -08:00