# Reading standard input one character at a time

**URL:** https://clojureverse.org/t/reading-standard-input-one-character-at-a-time/5354
**Category:** Beginners
**Created:** [January 11, 2020, 9:27pm UTC](https://clojureverse.org/t/reading-standard-input-one-character-at-a-time/5354 "2020-01-11T21:27:27Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![jewiet](https://clojureverse.org/user_avatar/clojureverse.org/jewiet/32/6127_2.png) [@jewiet](https://clojureverse.org/u/jewiet)
#### Post date: [January 12, 2020, 4:20pm UTC](https://clojureverse.org/t/reading-standard-input-one-character-at-a-time/5354/2 "2020-01-12T16:20:33Z")

</div>

I made some progress using `clojure-lanterna` library. With the following code I can read and process one character but there is big side effect. The terminal window gets cleared when the program starts. Is there a way to avoid it?

```clojure
(ns lonely-dobble.user-input
  (:require [clojure.string :as str])
  (:require [lanterna.terminal :as t])
  (:gen-class))

(def term (t/get-terminal :text))

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
  (t/start term)
  (let [character (t/get-key-blocking term)]
    (t/stop term)
    (println character)))

```

---

_[View the full topic](https://clojureverse.org/t/reading-standard-input-one-character-at-a-time/5354)._
