- May 27, 2022
-
-
Clayton Craft authored
Fixes #142
-
-
Clayton Craft authored
Mostly useful for testing, where we want the osk to show up reliably regardless of whether there is a physical keyboard attached. But might be useful for other use cases too.
-
- Aug 29, 2021
-
-
Fixes #91
-
- Jul 31, 2021
-
-
Clayton Craft authored
Width/height were accidentally swapped when initializing the keyboard toggle, causing the text position calculation to be wrong and resulting in the text not being displayed on the toggle surface. Oops.
-
- Jul 29, 2021
-
-
Clayton Craft authored
Previously added destructors fired too late, after the renderer was destroyed, causing seg faults on musl (though, not on glibc, so it must be some undefined behavior or ???) Explicitly calling a cleanup() for these objects to free textures at the end of the app seems to be working well, no leaks and no use-after-free/double-free/etc issues. The default destructors for these objects is used for everything else.
-
Clayton Craft authored
Other objects use TTF_* too, so initializing it in the keyboard object could introduce some race condition (though I've never seen one first hand...) It's still good to do it in a central place. This also calls TTF_Quit() to clean up.
-
Clayton Craft authored
-
Clayton Craft authored
This is a slight optimization that moves scheduling of a render event so that it is only scheduled when a repeat character satisfies the repeat delay, which is the only time a dot will be drawn on the screen for the character. There's no reason to render things if the key repeats before the delay since the character is discarded and nothing new is added to the screen.
-
Clayton Craft authored
The newly added C-u hotkey seems to be generating a text input event in SDL on some systems (Pinebook Pro), while it did not on other systems (thinkpad running Arch) in testing the earlier patch. This returns from the text input handling when the event was fired because C-u was held down.
-
- Jul 21, 2021
-
-
Clayton Craft authored
-
Clayton Craft authored
This queries input device 'key' capabilities to try and determine if a physical keyboard is present. If one is present, it hides the on-screen keyboard.
-
Clayton Craft authored
this is a common binding in applications and helpful when using a physical keyboard.
-
- Jul 02, 2021
-
-
Clayton Craft authored
When no keyboard is used (-x), the input box is comically large on some systems (PineBook Pro). This wraps the height of the input box to be slightly more than the font size. It makes some gross assumptions about font size and pixels, but seems to work on the two devices I tested on (librem 5 and PBP)
-
Clayton Craft authored
This option, -x|--no-keyboard, makes osk-sdl behave like a prettier `cryptsetup open`, with just an input box for devices that have physical keyboards. The performance of this should be really good when there is no hw accel support (i.e. using directfb / sw rendering), since it's only rendering the input box + contents/dots and not the keyboard/layers/keycaps.
-
- May 27, 2021
-
-
Clayton Craft authored
This reduces the render time for a 2 render pass (using sw rendering) by something close to 50%, as measured on a Librem 5 with SDL2 sw rendering. RenderClear clears the screen to the wallpaper color, thereby saving quite a lot of time. The render while loop was measured as a whole with gettimeofday (converted to msec): Before: INFO: render loop: 360 ms INFO: render loop: 367 ms INFO: render loop: 367 ms INFO: render loop: 362 ms After: INFO: render loop: 175 ms INFO: render loop: 165 ms INFO: render loop: 154 ms INFO: render loop: 167 ms
-
Clayton Craft authored
The tooltip position is based on the keyboard height, so this draws the keyboard when animations are disabled *before* tooltips are drawn so that the tooltip is immediately drawn at the correct location. When animations are enabled (and, key previews), the keyboard is drawn *after* the tooltip so that they tooltips don't overlap the key previews. This is the existing behavior before this change.
-
- May 23, 2021
-
-
Added the -o osk.conf option that's loaded after the main config file and is optional. It can be used to load user overrides from a file of /boot where it's easier for users to edit than inside the initfs.
-
- May 20, 2021
-
-
Clayton Craft authored
There's a cost to calling SDL_GetTicks and it's only used when handling key repeat events, which is very very rare in the main loop.
-
Clayton Craft authored
DirectFB/framebuffer uses sw rendering and is super slow on most devices that are trying to run osk-sdl. This disables animations (wavy dots...) and key preview popups when the renderer is DirectFB to help make osk-sdl more responsive for devices that don't have hw accel support.
-
Clayton Craft authored
This shows a simple tooltip with a message to the user that the app is trying to unlock the disk, when the app has animations disabled.
-
Clayton Craft authored
This mechanism was broken, or not really working as intended. The empty event was ignored by the main loop, and I think what was intended was for this to trigger a render event (e.g. for displaying an error). This is necessary when osk-sdl is running without animations, since the animation loop pushes render events continuously into the queue and this is will *not* happen when animations are intended to be disabled.
-
Clayton Craft authored
SDL docs recommend using RegisterEvents to get a type rather than just setting it manually. This also allows us to get a consistent type to pass to threads, etc for triggering a rendering event from there.
-
- Mar 20, 2021
-
-
Clayton Craft authored
This adds a new tooltip that shows when the app starts, and when no text is in the input box (including when all text is deleted), informing the user to input a disk decryption passphrase. The tooltip disappears as soon as the user starts entering characters, and the normal password dots replace it in the input box. I decided to use a tooltip in this way since there was not enough space on the screen to fit it elsewhere when the screen height is small (e.g. on the N900), and I think this looks rather nice. fixes #60
-
Clayton Craft authored
-
- Feb 04, 2021
-
-
Clayton Craft authored
I think this is helpful to have for debug reasons: ❯ ./_build/osk-sdl -d a -n a -c osk.conf -v INFO: osk-sdl v0.62.1 ERROR: TTF_OpenFont: Couldn't open /usr/share/fonts/ttf-dejavu/DejaVuSans.ttf
-
- Feb 01, 2021
-
-
Clayton Craft authored
fixes #126
-
Clayton Craft authored
The keyboard should manage its own haptic stuff, since keyboard haptic events are tied to keyboard events.
-
- Jan 31, 2021
-
-
Clayton Craft authored
fixes #125
-
Clayton Craft authored
The GLES stuff doesn't seem to work (with fbdev at least), so this skips any preference to use GLES when running on DirectFB.
-
Clayton Craft authored
This backend causes SDL to crash when it initializes with haptic support (SDL uses udev, which isn't available/working in initfs for directfb for reasons I didn't dig into further).
-
- Jan 15, 2021
-
-
Clayton Craft authored
The key row count was increased in MR !111, as a result it reduced the calculated keycap size on the keyboard, causing accessibility issues. The denominator used for calculating the keyboardHeight was chosen by comparing the calculated key height before !111 with the key height after !111. This was tested on a pinephone w/ kmsdrm, and on my laptop with wayland and various settings for HEIGHT and WIDTH. Fixes #122
-
- Jan 13, 2021
-
-
When in keyscript mode, the password should not be considered a log, as this will both not output anything without verbose mode and output additional non-password text in verbose mode. Either of these leads to the user being unable to unlock their disk. Resolves #120
-
- Jan 12, 2021
-
-
This change makes osk-sdl use the OpenGL ES driver whenever it is available. If it is not available, the app falls back to the default driver. Additionally, a new command line option -G / --no-gles was added that allows to opt out of the behavior and fall back to the default driver from the start. Closes: #102
-
Clayton Craft authored
This enables haptic feedback when typing on the keyboard. Vibrations are triggered on touch/mouse down events, which seemed more natural than triggering it on the up events. If it's not working, then the module for the haptic/vibration device may not be enabled or available (e.g. when in initfs) Closes #95
-
- Jan 06, 2021
-
-
Clayton Craft authored
SDL's manual claims that calling SDL_Quit is safe even if init fails, so it's set *before* SDL_Init: > It is safe to call this function even in the case of errors in > initialization. https://wiki.libsdl.org/SDL_Quit fixes #79
-
- Jan 01, 2021
-
-
Johannes Marbach authored
This aligns the wrong-password tooltip's position with the input and applies the same corner rounding (if any).
-
This avoids repeating the computation in three different spots.
-
This replaces the three related arguments inputWidth, screenWidth and y with a single argument for the input rect and rebases all coordinate computations on the latter. The benefits are: - The function signature and call site are simplified - Computations inside the function are no longer directly based on the screen width which makes them more robust against future changes - The input rect is accessible inside the body and can be used for future improvements (like clipping)
-
- Dec 17, 2020
-
-
This adds key highlighting on click or tap. The highlight colors were added to the config file. For character keys an additional preview is shown above the key.
-