Thanks...I can understand in a grand piano the larger ones have longer keys, hence better leverage and control..
but is it the same for upright? I thought the key length are the same for uprights
Well, they are not all the same but they are governed by different rules.
Key length in grand action is primarily established by the distance from the front of the keybed to the hammer strikeline. In two grands of the same overall length—but coming from different manufacturers—there can be small variances due to how the tuning pin field is laid out, the thickness of the stretcher, etc., but overall they will be fairly close.
The key lengths in vertical pianos are largely a matter of style. In general shorter vertical pianos will have shorter keys because case designers don’t want the keybed and its associated cabinetry extending overly far out away from the body of the piano. It visually unbalances the piano. Taller pianos can—but do not always—have longer keys because visually the taller cabinetry can accommodate them.
There are obviously exceptions to these generalities; occasionally we’ll see a tall piano with relatively short keys or a short piano with longer keys depending of the style of the instrument. But other than for the dictates of style there are no physical laws that dictate the length of keys in vertical pianos. If longer keys are used it is usually because somebody up the chain with an eye for performance overruled those with an eye for style.