I have keys but no locks.
I have space but no walls.
You can enter, but you can't leave.
What am I?
Answer:
A keyboard from before the computer mass market
I have keys but no locks.
Keyboards have keys, but modern keyboards include Caps Lock. Early computers only had upper case letters, so there was no need for a caps lock.
I have space but no walls.
Spacebar
You can enter, but you can't leave.
The Enter key (sometimes called Return)
Answer:
A keyboard
I have keys but no locks:
The keys on a keyboard
Space but no walls:
Spacebar but no walls
Enter but not leave:
Enter key
Keyboard
I have keys but no locks.
All the keys
I have space but no walls.
Space key
You can enter, but you can't leave.
Enter key