i have problem with my laptop keyboard spacebar is automatically working untill esc key pressed

Solution
Remove the key, make sure there is nothing stuck in the connections. Or simply replace the keyboard, that is 90% likely to fix the issue. 3rd party keyboards work well and are maybe $15-20 on ebay.