KeyboardKit: iOS keyboard extensions can't differ between dark mode and dark appearance
The KeyboardContext colorScheme becomes wrong when keyboardAppearance is .dark and the device runs in .light mode. The keyboard extension will be told that the colorScheme is .dark instead of .light.
This is WRONG, since “dark appearance” keyboards should NOT look the same in light mode and dark mode. However, this is how iOS sets up the extension and not a bug in KeyboardKit.
Until this is fixed, set the Color.darkAppearanceStrategy to a custom strategy if you want to customize KeyboardKit’s standard strategy of always applying dark appearance colors when dark mode is enabled.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 26 (10 by maintainers)
This fix is available in 4.8.
@ibayramli2001 I’m happy to say that I’ve got it working!
It works with the callouts as well.
I will take this opportunity to reduce the shadow opacity in dark appearance as well, since the KK keyboard shadow is a little bit darker.
Yeah, it shoudn’t be so much work fixing this.
Great insight! I think just replicating what Grammarly does would be enough since as a user, I did not experience much difference between iOS and Grammarly keyboards. Can we hope for a new KK update sometime soon fixing this?
With the two dark appearance/mode images side by side and the transparent info we got from image one, it should be a walk in the park to just create a blank project and find the correct white opacity.
However, for now, the callouts use the same color as the buttons, which means that they would become transparent too. This has to be fixed, so that they use their own colors.
Actually, you can see in Grammarly, that the callout background color is different and the same for both dark appearance and dark mode:
Oh, so that bug is not persistent, just happens when switching light/dark modes right? The buggy version looks suspiciously similar to what were experiencing with the dark keyboard against light text field.
@ibayramli2001 Could you please move the bug to a separate issue, so we don’t mix it together with the dark mode/appearance bug?