I have an arduino uno connected to my laptop. and i need to get keypress info from the laptop's keyboard with only the arduino sketch and without any program running on the laptop. Is there a specific library or some way of doing so?
You can't. It's impossible.
Or not as you have requested it, anyway.
The Arduino can only talk over Serial, so you will have to have some software running on the PC that transfers data (however that data is generated) over serial to the Arduino to process.
The only other option will be to have one of the Arduino boards that is capable of acting as a USB Keyboard device, such as a Leonardo, plus either a PS/2 keyboard or a USB keyboard plus a USB Host shield. Your Arduino the receives the keystrokes from the keyboard, processes them, and sends the result on to the PC.