When I try to duplicate an object with shift + d it doesn't work cause the controls change inmediately to the timeline
If you want to manipulate objects in 3D-view, your cursor has to stay inside that area for shortcuts to work .
The only standard explanation I know would be that you are not in the right area. Blender uses a concept called implicit focus. It means that the active area is the one below your mouse cursor. That saves you a lot of clicking but it can also mean that keyboard shortcuts won't work or do different things if your cursor is misplaced by accident.