Generally speaking, the keyboard is a more versatile instrument than the guitar. It can be used to play a wide variety of music, from classical to jazz to rock. The keyboard also has a wider range of sounds than the guitar, making it possible to create a greater variety of music.
However, the keyboard can also be more complex than the guitar. There are more keys to learn, and the fingering can be more complicated. Additionally, the keyboard requires a greater degree of coordination between the hands.
The guitar is a more portable instrument than the keyboard. This makes it easier to take the guitar with you when you travel. The guitar is also a more social instrument. It is often used to accompany singing, and it can be used to play a wide variety of music, from folk to blues to rock.
Ultimately, the best way to decide which instrument is more difficult for you is to try them both out. See which one you find more enjoyable to play, and which one you are more motivated to learn.