guess it can be a rewrite of 3e monkey grip feat...
Pretty much, yeah.
When a Halfling does use a Heavy weapon, it prefer it be custom-made for a Small creature, especially for its grip and the heft of its swing. In the case of the longbow, I visualize a Japanese yomi shape, to keep most of the bow higher up in the air.
then just have them medium size but little shorter, like dwarves or some subspecies of elves.
Maybe. In the same sense, some reallife humans would be Large, over 8 feet tall and physically fit. It might be, a Halfling can be Medium, even if rare.
then they also need to be magically heavy (as fullsized humans) or be magically glued to the ground for needed friction to handle the momentum of heavier weapon.
Heh, being "glued to the ground" is the part that bothers me the most. That said. This might not actually be an issue. Proportionally, a Halfling with a greatsword is like a Human with an unusually long glaive (or naginata). The polearm would be over 11 feet tall, including the pole and the bladelength. This isnt really done in reallife history, but some polearms come close. It seems like the oversized glaive is plausible, and in any case being glued to the ground isnt one of the issues of concern here.
(Of course, the lance and pike are polearms that can be 12 feet and far longer, but these arent swung with a blade the way a glaive is.)
I'm for preventing it. If large creatures have double base weapon damage comparing to medium, them small characters need half the base weapon damage compared to medium characters.
Maybe the weapon list itself can mention its effective size. Dagger counts as a Tiny Weapon, Shortsword is Small, Longsword/Rapier is Medium, greatsword is Large.
These Weapon Sizes have nothing to do with mechanical restrictions, but are for flavor associations.
Actually, it is probably fine if these weapons have prereqs. Example. Tiny prereq Dex Score 13, Small prereq Dex Score 9, Medium prereq Str Score 9, Large prereq Str Score 13. One must meet the prereq in order to use this weapon effective, or else incur a Disadvantage.
I can see situations where some Wizards are nondexterous and cant use a dagger in any meaningful way in actual combat, so use a staff instead.