2020-08-05T20:39:46 <vkoskiv> Well, it's generally just the file name, with no extensions.
2020-08-05T20:40:14 <vkoskiv> The CharacterMapFile class load_from_file then prepends /res/keymaps/ and appends .json, if needed
2020-08-05T20:40:30 <vkoskiv> So I don't *have* to do filtering here I guess
2020-08-05T20:40:41 <vkoskiv> I figured it would still be good just in case?
2020-08-05T20:40:54 <kling> yeah let's keep path logic in one place
2020-08-05T20:40:56 <kling> instead of spreading it
2020-08-05T20:40:59 <vkoskiv> Sure.
2020-08-05T20:41:21 <vkoskiv> So for the kernel limitations, I'll of course enforce those *in* the kernel, instead of before passing that stuff in
2020-08-05T20:41:49 <kling> it's just a string to store alongside the key mappings, nothing too scary :)
2020-08-05T20:41:51 <vkoskiv> We were talking about limiting it to ~50 chars and no special characters
2020-08-05T20:42:00 <kling> just do a sanity check like <50 chars or whatever yeah
2020-08-05T20:42:01 <vkoskiv> Sure, but I don't want to cost you $5!
2020-08-05T20:42:04 <vkoskiv> Yeah okay.
2020-08-05T20:42:21 <vkoskiv> I'd just like the /proc/keymap output to be clean, just 'fi'
2020-08-05T20:42:27 <vkoskiv> Instead of a file path and stuff
2020-08-05T20:42:35 <kling> /proc/ should be all JSON
2020-08-05T20:42:43 <vkoskiv> Ah. True.
2020-08-05T20:42:49 <vkoskiv> Well, that, then.
2020-08-05T20:42:50 <kling> but just follow the pattern in ProcFS.cpp :)
2020-08-05T20:42:55 <vkoskiv> Yep
2020-08-05T20:42:55 <linusg> add some quotes, problem solved? (About a different kind of quote, but that's good enough for me! :))
2020-08-05T20:43:04 <kling> and yeah, the path is not really meaningful anyway
2020-08-05T20:43:05 <vkoskiv> {"keymap": "fi"}
2020-08-05T20:43:22 <kling> what matters is "hey, you are using a keymap that identified as 'fi' when i loaded it"
2020-08-05T20:43:25 <vkoskiv> *Then* I can modify the KeyboardSettings app to read that, and show what's currently selected in the combobox!
2020-08-05T20:43:43 <vkoskiv> It's a detail that popped out as weird to me, so this is an easy thing I can fix.
2020-08-05T20:44:27 <kling> those are the best things to work on
2020-08-05T20:45:52 <vkoskiv> Do I cast const char * to Userspace<const u8*> or what
2020-08-05T20:46:06 <vkoskiv> For the syscall params
2020-08-05T20:46:16 <vkoskiv> (SC_setkeymap_params)
2020-08-05T20:46:24 <kling> no need, that happens implicitly
2020-08-05T20:46:32 <kling> you can just pass your const char*
2020-08-05T20:46:42 <vkoskiv> Not according to Qt Creator here
2020-08-05T20:46:50 <vkoskiv> No viable conversion
2020-08-05T20:47:02 <kling> QtCreator doesn't know if you're in kernel or userspace
2020-08-05T20:47:03 <vkoskiv> I just do m_character_map_name.characters()
2020-08-05T20:47:06 <vkoskiv> Ooh true
2020-08-05T20:47:14 <kling> i switch that by editing my project.config file
2020-08-05T20:47:22 <vkoskiv> I did the same
2020-08-05T20:47:26 <kling> "#define KERNEL" for kernel hax, comment it out for userspace
2020-08-05T20:47:45 <vkoskiv> Yeah, I wrote the video tutorial into a little text guide and filed a PR
See also all other quotes.