# How to take the value after typing one character in redline (Char?) Without ENTER

**URL:** <https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691>\
**Category:** General Usage\
**Created:** [March 7, 2020, 5:31pm UTC](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691 "2020-03-07T17:31:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 7, 2020, 5:31pm UTC](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691/1 "2020-03-07T17:31:43Z")

</div>

Is there a way for the variable var to take the value after typing one character in redline (Char?) without pressing Enter? Something like

var = readline (:: Char?)

(I am doing a quick one-touch input interface)

Paul

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [March 7, 2020, 6:58pm UTC](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691/2 "2020-03-07T18:58:59Z")

</div>

I think just reading a char from stdin should work.

Like `read(stdin, Char)`

---

<div class="post-metadata">

**Author:** ![programista](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/programista/32/5372_2.png) [@programista](https://discourse.julialang.org/u/programista)\
**Post date:** [March 7, 2020, 7:29pm UTC](https://discourse.julialang.org/t/how-to-take-the-value-after-typing-one-character-in-redline-char-without-enter/35691/3 "2020-03-07T19:29:53Z")

</div>

```julia
julia> var=read(stdin, Char)
aaa
'a': ASCII/Unicode U+0061 (category Ll: Le

julia> aa
ERROR: UndefVarError: aa not defined

```

After typing one char nothink 😕

It is necessary for only one character to have the same reaction as for the character(s) + Enter now.  
typing one char = automatlicly to closing function.
