Skip to content

Commit d6cede7

Browse files
committed
joy2key,wifi: add an on-screen keyboard dialog
Currently, the WiFi configuration from RetroPie menu needs a keyboard for configuring a connection. Added a `python` script to display on-screen keyboard which can be operated with `joy2key` and the gamepad, which allows entering the WiFi network/key/password without a keyboard. The script accepts keyboard input, so it's suited for both keyboard and joystick input. It's using the `urwid` library (https://urwid.org). The WiFi scriptmodule was modified to use the new OSK script instead of the `dialog` based inputboxes. Additional modifications to the WiFi module: - added a confirmation step before removing the WiFi config and stopping the WiFi - added an info message during the WiFi scanning (instead of having a black screen) - removed the check for the pass length, it's done by the new OSK script - reformatted a bit the 'country' warning NOTE: I've tested the new OSK script with smaller displays, but anything less than 40 cols will not be displayed fully. The OSK keyboard will scroll horizontally (when there's no more space on screen), but this is non-intuitive and might confuse users. _If_ we need to accomodate an even smaller screen size, then the OSK display area should be probably changed to accomodate that (i.e. less letters on a 'keyboard' row).
1 parent 68f8f28 commit d6cede7

File tree

3 files changed

+648
-14
lines changed

3 files changed

+648
-14
lines changed

scriptmodules/admin/joy2key.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ rp_module_section="core"
1515

1616
function _update_hook_joy2key() {
1717
# make sure joy2key is always updated when updating retropie-setup
18-
rp_isInstalled "$md_id" && install_bin_joy2key
18+
rp_isInstalled "$md_id" && rp_callModule "$md_id"
1919
}
2020

2121
function depends_joy2key() {
22-
local depends=()
22+
local depends=(python3-urwid)
2323
# 'python3-sdl2' might not be available
2424
# it's packaged in Debian starting with version 11 (Bullseye)
2525
local p_ver
@@ -33,7 +33,7 @@ function depends_joy2key() {
3333

3434
function install_bin_joy2key() {
3535
local file
36-
for file in "joy2key.py" "joy2key_sdl.py"; do
36+
for file in "joy2key.py" "joy2key_sdl.py" "osk.py"; do
3737
cp "$md_data/$file" "$md_inst/"
3838
chmod +x "$md_inst/$file"
3939
python3 -m compileall "$md_inst/$file"

0 commit comments

Comments
 (0)