Started by firefrorefiddle, September 09, 2014, 07:34:06 PM
0 Members and 1 Guest are viewing this topic.
Quote from: Michael 'Cruzer' on September 12, 2014, 10:47:45 AMOtherwise just don't call stop ever and accept that user always manually must close keyboards on such systems may also be an option.
Quote from: Ters on September 12, 2014, 02:37:07 PMThis might cause problems down the line, even though it works now. Third party developers doing things like this have been much of the reason why new versions of Windows have gotten many complaints.
Quote from: prissi on September 11, 2014, 10:15:45 PMIs there an easy (and portable) way to find out if we need this? I fear not ...
Quote from: Philip on September 12, 2014, 03:41:57 PMI think what the SDL2 people would want us to do is to use SDL_KEYDOWN events rather than SDL_TEXTINPUT events (and incidentally handle multi-character SDL_TEXTINPUT events). However, it looks like we'd have to do our own shift handling then, which seems unnecessarily difficult.
Quote from: Philip on September 12, 2014, 03:41:57 PMThe easy fix would be to call SDL_EventState( SDL_TEXTINPUT, SDL_ENABLE ); after each call to SDL_StopTextInput(). Why don't we do that?
Quote from: Ters on September 12, 2014, 06:48:09 PMI don't think the SDL2 people would want us to do it one way or the other. It's probably more that binding to keys rather than letters are the norm, which makes for action packed games. When using WASD instead of arrow keys, they want the keys that are WASD on English query, not the keys that actually have W, A, S and D on a Dvorak layout. That telling user to make the WASD-keys make no sense for a Dvorak user, is of less importance and they will soon learn which keys they are supposed to use, as they will continually use them. Simutrans is just different from the majority.
Quote from: Philip on September 13, 2014, 08:48:44 PMI don't think SDL2 does that, though. event.key.keysym.sym is 'o' for the Dvorak O key (labelled as S on an English keyboard). However, it does set event.key.keysym.scancode to SDL_SCANCODE_S.
Quote from: Philip on September 13, 2014, 08:48:44 PMSo we wouldn't change anything for dvorak users by moving to handling SDL_KEYDOWN events rather than SDL_TEXTINPUT events. It would still be a bit of work because we'd have to handle shift ourselves.
Quote from: TurfIt on September 13, 2014, 09:27:16 PMr7292 "(Cruzer) show keyboard in SDL2 when doing text input" was added why?
Quote from: prissi on September 14, 2014, 09:00:16 PMYes, but on device with a keyboard (the majority) the keyboard becomes useless. Probably this needs a clever detection if a softkeyboard is needed or not.For now you can set hide_keyboard = 1 in simuconf.tab
Quote from: prissi on October 17, 2021, 08:45:55 AMAdded reanbling SDL_TEXTINPUT in r10167