Just start this game, I was founded all 4 keys and I can't get in the library.
After you've found the 4 keys you have to
1) Fight the rat
The rat is in the basement of the tower, to fight it you also have to have the small rapier. this can be found in the cupboard in your room.
2)Find the location of the chest
Your farther tells you to use your mind reading capability on people as one of the NPCs knows the location but won't tell you.
The NPC you need is in the garrison, which is to the right of the castle (but still within the outer walls). The NPC is on of the guards sitting at the table.
Press 'A' before talking to someone to activate mind reading.
3)The chest is in your room but inivisible
To make it visible you have to learn Dispell. To do this go to the library in the tower and into the room at the bottom right and look at the bookcases.