Arthor Posted April 4, 2015 Posted April 4, 2015 there is a problem i have encountered when i play Openjk. i found out about this project recently so i am not fully sure how is it suppose to run so i figured i would ask you guys for help.The 1st problem i encounted was that all my binds in jedi academy were gone i am not sure why this have happened so maybe you guys have any ideas is it because i run jk3 on the unpatched version or is it something else. another question is if i am modifying Openjk-master in my gamedata folder does that directly change the openjk mod i am not sure how this works Thanks in advance
Arthor Posted April 4, 2015 Author Posted April 4, 2015 the problem was that i am using a swedish keyboard and apperantly it is not possible to bind those keys maybe something you guys can fix
ensiform Posted April 4, 2015 Posted April 4, 2015 #1 OpenJK is not for unpatched version#2 OpenJK uses the SDL2 library for cross platform input and window management and opengl context creation, so this is not something we may be able to fix on our end. We need to at least see your binds as to why they might be broken. Arthor likes this
AshuraDX Posted April 4, 2015 Posted April 4, 2015 I had a similiar problem : I used the "ü", "ä" and "ö" keys to various stuff in base JKA to simply because nothing ever really uses these keys - sadly I can't do this in OpenJK it just won't let me bind stuff to themthere is no error or anything it just doesn't work Arthor likes this
eezstreet Posted April 4, 2015 Posted April 4, 2015 I think those are Unicode characters and you wouldn't be able to bind them anyway since everything uses ASCII. Arthor likes this
AshuraDX Posted April 5, 2015 Posted April 5, 2015 I think those are Unicode characters and you wouldn't be able to bind them anyway since everything uses ASCII.and why did it work in base Jedi Academy then ? Arthor likes this
Arthor Posted April 5, 2015 Author Posted April 5, 2015 i have the same issue as you AshuraDX, i really o not like to have keys that are useless in the game. My binds are not broken it is just the individual keys "ö"ä"å". So there are no fix that is sad but shouldn't it be possible to have the openjk to run the deafult jaconfig from the base folder ?
eezstreet Posted April 5, 2015 Posted April 5, 2015 and why did it work in base Jedi Academy then ?hm!! Interesting
Didz Posted April 5, 2015 Posted April 5, 2015 The SDL migration brought in a lot of regressions like this (minor enough to go ahead with the change though). If either of you have some spare time, could you create an issue for it on the GitHub site? I don't have a non-English keyboard so I can't test the broken functionality here, but we need some concrete stuff to work off, such as the config files containing the key bindings and the affected keyboard layouts, etc. If there's any difference in how basejka and OpenJK generate the bindings to the saved config file, these would need to be noted too.
Xycaleth Posted April 11, 2015 Posted April 11, 2015 There were two keyboard related problems in OpenJK when using SDL2: key bindings, and key input. The two are treated slightly differently for various reasons. I think those are Unicode characters and you wouldn't be able to bind them anyway since everything uses ASCII.Characters aren't Unicode or ASCII. These are character encodings which means that there is a strict number of characters it can represent. The latin alphabet (a, b, c, d, etc) can be handled by most encodings, but then some characters like ö and ä need specific character encodings. Unicode happens to be able to represent a very large number of characters, but character encodings like Windows-1250 can also encode ö and ä. It's also important to realise that representations of a character in character encoding does not necessarily represent the same character in another encoding. For example, the Russian character Я is value 223 in Windows-1251, but in Windows-1250 value 223 represents the character ß. This is why when reading Russian text in JKA, without setting se_language to russian will make the text look weird. The text input problem in OpenJK was that SDL2 provides all characters as UTF-8, but JKA originally expected them to be encoded with a specific character encoding specific to each keyboard layout. For example...Russian uses Windows-1251 encoding on Windows, Central European languages use Windows-1252, both of which are single character encodings (value from 0 to 255). To fix the problem, I've mapped the character in UTF-8 back to the encoding that JKA was expecting. Using the same example as above, Я in Unicode is 0x042F and gets mapped back to 223. Likewise for ß is 0x00DF which also gets mapped back to 223 (It just so happens that 0x00DF == decimal 223). There's still the Asian languages to fix, but that's being deferred to some other time as I'm not aware of anyone in those regions who play JKA nowadays. The problem with the OP was related to key bindings. This was a bit simpler to fix - we were actually missing a lot of cases for handling key binds which you wouldn't find on a US keyboard. Adding in the missing cases fixed the problem If you're interested in testing the fixed version, I've made a quick build here: https://dl.dropboxusercontent.com/u/874909/OpenJK-Windows-x86-JKAMP.zip I've only provided MP in zip file, but the code is fixed in SP as well. Raz0r, AshuraDX and Didz like this
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now