Does SetKeyMapDefault() change globally in my system the KEYMAP I want/need?
How? The code example below shows 'KEYMAP:usa_ISO-8859-15' info/data OK, but if I try to change my keymap from e_ISO-8859-15 (defined in input.prefs) to 'usa_ISO-8859-15' with SetKeyMapDefault() seems nothing happens.
Code: Select all
int main(void)
{
ULONG KM_res;
APTR KM_handle;
STRPTR KM_name, KM_localname;
//struct KeyMap *km = NULL;
struct KeyMapNode *kmn = NULL;
..
open KeymapBase & IFace
..
KM_handle = IKeymap->OpenKeyMapHandle("KEYMAP:usa_ISO-8859-15", NULL);
KM_res = IKeymap->ObtainKeyMapInfo(KM_handle,
KEYMAPINFO_KEYMAPNODE, &kmn,
KEYMAPINFO_INFOTEXT_ENGLISH, &KM_name,
KEYMAPINFO_INFOTEXT_LOCAL, &KM_localname,
TAG_END);
IDOS->Printf("(0x%08lx) %s | %s\n",kmn->kn_KeyMap,KM_name,KM_localname);
IKeymap->SetKeyMapDefault(kmn->kn_KeyMap);
..
close KeymapBase & IFace
..
return(0);
}
BTW2: must I ReleaseKeyMapInfo() if I use ObtainKeyMapInfo() in my code?
TIA