How did Japan get Taiwan?

Ceded to Japan by Qing Empire China by the Treaty of Shomonoseki following the First Sino-Japanese War