# Is it normal to get SDL\_TEXTEDITING events w/o SDL\_StartText

**URL:** <https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240>\
**Category:** SDL Development\
**Created:** [February 27, 2015, 4:56am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240 "2015-02-27T04:56:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sparks](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Sparks](https://discourse.libsdl.org/u/Sparks)\
**Post date:** [February 27, 2015, 4:56am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240/1 "2015-02-27T04:56:37Z")

</div>

This is odd, on startup, I am getting a SDL\_TEXTEDITING event and SDL\_StartTextInput() isn’t even called yet, since I didn’t make a routine that calls SDL\_StartTextInput() yet.  
So, why is this event being fired?  
This is with SDL git head at 2287c7b03 from the git mirror [https://github.com/spurious/SDL-mirror.git](https://github.com/spurious/SDL-mirror.git)

Code:

- 

```
  event	{type=770 common={type=770 timestamp=332 } window={type=770 timestamp=332 windowID=1 ...} ...}	SDL_Event
  type	770	unsigned int

```

- 

```
  common	{type=770 timestamp=332 }	SDL_CommonEvent

```

- 

```
  window	{type=770 timestamp=332 windowID=1 ...}	SDL_WindowEvent

```

- 

```
  key	{type=770 timestamp=332 windowID=1 ...}	SDL_KeyboardEvent
```

---

<div class="post-metadata">

**Author:** ![Sparks](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ee7513/32.png) [@Sparks](https://discourse.libsdl.org/u/Sparks)\
**Post date:** [February 27, 2015, 4:58am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240/2 "2015-02-27T04:58:06Z")

</div>

Forgot to mention, this is on windows 7.

---

<div class="post-metadata">

**Author:** ![john\_skaller](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/j/58956e/32.png) [@john\_skaller](https://discourse.libsdl.org/u/john_skaller)\
**Post date:** [February 27, 2015, 5:08am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240/3 "2015-02-27T05:08:03Z")

</div>

> This is odd, on startup, I am getting a SDL\_TEXTEDITING event and SDL\_StartTextInput() isn’t even called yet, since I didn’t make a routine that calls SDL\_StartTextInput() yet.

That seems correct on desktop OS with a fixed keyboard.

StartTextInput is only for touch screens, to popup the keyboard  
to tap on.

[It might also do something to enable input of complex  
foreign code points such as Chinese, using some specialised  
input method, even on a desktop]On 27/02/2015, at 3:56 PM, Sparks wrote:

–  
john skaller  
@john_skaller  
[http://felix-lang.org](http://felix-lang.org)

---

<div class="post-metadata">

**Author:** ![slime](https://discourse.libsdl.org/user_avatar/discourse.libsdl.org/slime/32/3845_2.png) [@slime](https://discourse.libsdl.org/u/slime)\
**Post date:** [February 27, 2015, 5:12am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240/4 "2015-02-27T05:12:48Z")

</div>

Text input is enabled by default on desktop OS’.\> On Feb 27, 2015, at 12:56 AM, Sparks wrote:

> This is odd, on startup, I am getting a SDL\_TEXTEDITING event and SDL\_StartTextInput() isn’t even called yet, since I didn’t make a routine that calls SDL\_StartTextInput() yet.  
> So, why is this event being fired?  
> This is with SDL git head at 2287c7b03 from the git mirror [GitHub - spurious/SDL-mirror: DEPRECATED: Official development moved to GitHub](https://github.com/spurious/SDL-mirror.git) [https://github.com/spurious/SDL-mirror.git](https://github.com/spurious/SDL-mirror.git)
> 
> Code:
> 
> - 
> 
> ```
> event {type=770 common={type=770 timestamp=332 } window={type=770 timestamp=332 windowID=1 ...} ...} SDL_Event
> type 770 unsigned int
> 
> ```
> 
> - 
> 
> ```
> common {type=770 timestamp=332 } SDL_CommonEvent
> 
> ```
> 
> - 
> 
> ```
> window {type=770 timestamp=332 windowID=1 ...} SDL_WindowEvent
> 
> ```
> 
> - 
> 
> ```
> key {type=770 timestamp=332 windowID=1 ...} SDL_KeyboardEvent
> 
> ```
> 
> * * *
> 
> SDL mailing list  
> SDL at [lists.libsdl.org](http://lists.libsdl.org)  
> [http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org](http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org)

---

<div class="post-metadata">

**Author:** ![Sik\_the\_hedgehog](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/db5fbb/32.png) [@Sik\_the\_hedgehog](https://discourse.libsdl.org/u/Sik_the_hedgehog)\
**Post date:** [February 27, 2015, 9:18am UTC](https://discourse.libsdl.org/t/is-it-normal-to-get-sdl-textediting-events-w-o-sdl-starttext/21240/5 "2015-02-27T09:18:30Z")

</div>

2015-02-27 2:08 GMT-03:00, john skaller :

> [It might also do something to enable input of complex  
> foreign code points such as Chinese, using some specialised  
> input method, even on a desktop]

Yep, IME input doesn’t work at all when text input isn’t enabled (and  
handling this properly is important, because when it’s enabled then  
you won’t get keypress events for the letters since they’re being  
captured by the IME!).
