Does the wordkey when I attack trigger on an empty battlefield?
No. "When I attack" triggers only fire when a unit gains the Attacker designation, which happens only during a Combat Showdown — moving to an empty battlefield is a Non-Combat Showdown (Rule 383.4.e, 459.2.b).
The trigger checks once when the designation is gained, and since there's no enemy unit, no combat, and no Attacker designation, nothing triggers.
One edge case: if your opponent later moves a unit into that battlefield during the showdown (e.g., via Ride the Wind), combat begins and your unit becomes the Attacker — the attack trigger fires then (FAQ #9339).