how to connect usb mouse and arduino leonardo? and how to fix or disappear mouse

hi there
first of all, I'm korean and not good at english. so please understand my awful writing.

Now a days, I make some impressive keyboard using arduino leonardo.
And I union usb mouse to that keyboard.(I already use all pin(analog pin 6 and digital pin 14))
So keyboard that I made has 2 usb line. One is arduino's and the other is mouse's
If I use usb hub, it may be solved. But I want to find another way.
For example, mouse usb cable is connected to arduino leonardo.
For a few days, I try to find solution, but I can't find it.

And second question.
when I typing my keyboard, mouse cursor is moving.
That keyboard has mouse, so typing make that moving.
If I make switch in mouse led, and turn on and off mouse by the switch,
it may be solved.
But I want to find another way(using arduino code)

I already made a prototype of the keyboard. And it is pretty comfortable.
And I'm first maker this keyboard.
I googling all keyboard, but this type is not founded.
When I complete making keyboard, I will show you. :slight_smile:

To connect a USB mouse to the Arduino you will need a USB Host Shield or equivalent. That will use some of your pins so you will likely need to add some hardware to increase the number of available pins. That may require changing whatever libraries you use for keyboard input to use the external pins.

It will be easier to take the electronics out of a small USB hub and include them in your keyboard enclosure.

Can you give us a picture? Maybe a schematic drawing? A pencil sketch is fine. It doesn't have to be a professional drawing.

Thank you for your answer.
I'll use usb hub(2 port).
Have a nice day :slight_smile:

I have another idea to solve this problem.
And start to change my design.
I'll send my keyboard's picture 1 weeks later by message.