Fixed keyboard shortcuts

This commit is contained in:
George Sokianos 2021-12-21 20:26:28 +00:00
parent fdd2f3af33
commit ff535843e8
4 changed files with 23 additions and 3 deletions

View File

@ -24,10 +24,10 @@ SetEnv SAVE HOME "Sys:home/"
## TODO list ## TODO list
- Free lost Gfx memory - Free lost Gfx memory
- Make the keyboard shortcuts work. Now, everything can be done with mouse clicks at the toolbar at the bottom of the file list at the left. DONE - Make the keyboard shortcuts work. Now, everything can be done with mouse clicks at the toolbar at the bottom of the file list at the left.
- If `HOME` is not set, set it to program folder on program run, having that as an ENV variable, without saving it (only in ENV:) - If `HOME` is not set, set it to program folder on program run, having that as an ENV variable, without saving it (only in ENV:)
- Make the application aknowledge of the executable file name. Now it works only with the filename `lite` - Make the application aknowledge of the executable file name. Now it works only with the filename `lite`
- Add Amiga versionings - Add Amiga versioning
- Fix the resolution of the fullscreen mode - Fix the resolution of the fullscreen mode
- Fix load file when add an Amiga path at the search line - Fix load file when add an Amiga path at the search line
- Add menu items - Add menu items

View File

@ -6,9 +6,10 @@ keymap.map = {}
keymap.reverse_map = {} keymap.reverse_map = {}
local macos = rawget(_G, "MACOS_RESOURCES") local macos = rawget(_G, "MACOS_RESOURCES")
local os4 = rawget(_G, "AMIGAOS4")
-- Thanks to mathewmariani, taken from his lite-macos github repository. -- Thanks to mathewmariani, taken from his lite-macos github repository.
local modkeys_os = require("core.modkeys-" .. (macos and "macos" or "generic")) local modkeys_os = require("core.modkeys-" .. (macos and "macos" or os4 and "os4" or "generic"))
local modkey_map = modkeys_os.map local modkey_map = modkeys_os.map
local modkeys = modkeys_os.keys local modkeys = modkeys_os.keys

15
data/core/modkeys-os4.lua Executable file
View File

@ -0,0 +1,15 @@
local modkeys = {}
modkeys.map = {
["left amiga"] = "cmd",
["right amiga"] = "cmd",
["control"] = "ctrl",
["left shift"] = "shift",
["right shift"] = "shift",
["left alt"] = "alt",
["right alt"] = "altgr",
}
modkeys.keys = { "cmd", "ctrl", "alt", "altgr", "shift" }
return modkeys

View File

@ -168,6 +168,10 @@ init_lua:
enable_momentum_scroll(); enable_momentum_scroll();
#endif #endif
#ifdef __amigaos4__
lua_setglobal(L, "AMIGAOS4");
#endif
const char *init_lite_code = \ const char *init_lite_code = \
"local core\n" "local core\n"
"xpcall(function()\n" "xpcall(function()\n"