cannot click with the cursor on ubuntu 20.04 LTS

This happend when I did something:

hck

I could then only write commands, make shortcuts and move the cursor(cannot click on anything).

I rebooted then and the problem was solved.

Why did it happend and are it better ways to solve it?

UPDATE:

input:

xkill

output:

Select the window whose client you wish to kill with button 1....
xkill: unable to grab cursor

From a question that I asked there was an answer that said:

I faced the same problem on Pop_!OS, no need to reboot actually;
The easier way is to just restart GNOME by one of two ways:

  • pressing Alt + F2, type r then Enter, or
  • in terminal, killall -3 gnome-shell

This should just restart Gnome Shell. You will not lose your open windows, but you should be reminded to save all your work >regularly!

Related bug: https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1824874

Solution

The answer works in this question too. Open terminal by pressing Ctrl + Alt + T.