Get a private key

Hello, is there a way to get a private key from the user by signing?

not sure what you mean, from a signature the private key can not be recovered

My goal is exactly that I want to do the transaction directly (without asking for final confirmation in the wallet)
I know that the way is to use a private key. I want the user not to have to enter their private key directly, but to receive it in some way or function. Do you suggest a way?