First aid for cat behaviour problems
Take your cat to the vet to diagnose, rule out, or address a medical problem such as pain and/or illness. Be sure to get your cat a urine and blood test!
Your cat isn't doing this to bully you, or because she's angry, or is a naughty or mischievous cat. Try to look at your cat as an animal, with needs and instincts and preferences and certain expectations of her environment.
By that we mean physical and/or invasive punishments such as startling, yelling, pushing, slapping, pushing her nose into urine on the floor, locking her away, throwing keys, etc (I've seen it all, multiple times). This will only make the unwanted behaviour worse. Either you do this by giving attention to the unwanted behaviour, or you may just make her emotions of fear, anxiety, and frustration worse.
It is impossible to just 'unlearn' a behavior, because there is always a good reason behind it. Find that need (we'll help with that) and make sure that your cat can express that need in another appropriate location, time and way that is also satisfactory for her.
Observe the behaviour thoroughly and accurately. Keep a journal and note where and when you observe unwanted behaviour, and write down what happened just before and after. That way you have data you can work with and compare with later on.
You can only help your cat with her behavior by first getting her 'below her threshold of arousal'. This means removing all possible triggers (including yourself) in the environment that can stress her in the form of anxiety (something scary might happen), fear (something scary is happening) or frustration.
Whatever problem you experience with your cat, it all starts with optimizing the environment by creating choice and abundance. Use the rule: your 'number of cats + 1' = number of locations for food, drinks, litter boxes, scratching places, shelters, water bowls etc.
Read and learn about cat behavior to understand why your cat does what she does, because it's always for a very good reason. Learn about emotions, motivations, causes and influences of behaviour, instincts, needs, the difference between normal & abnormal cat behaviour, between acute and chronic stress and between undesirable behavior and behavioral problems. That way a whole new world will open up to you, I promise.