I have been trying to reinstall but it still not working. When I write something gray layer come up under the text and I have to click it again to write just a single letter.
You should give more information, at least OS and C::B version. If using MacOS try disabling code completion, see https://sourceforge.net/p/codeblocks/tickets/1021/ (https://sourceforge.net/p/codeblocks/tickets/1021/)