~ことに
To my surprise, relief, regret, or other reaction
You’ll be able to introduce a fact while explicitly framing the speaker’s emotional reaction to it.

嬉しいことに、雨がやんで綺麗な虹が見えました。
ureshii koto ni, ame ga yande kirei na niji ga miemashita.
What do you think this sentence means?
To our delight, the rain stopped and a beautiful rainbow came into view.
Frame an event with an emotional reaction
~ことに attaches to emotion words at the beginning of a statement to introduce an event while highlighting the speaker's personal feeling about it ("to my surprise...", "happily...", "unfortunately...").
困ったことに、家の鍵をなくしてしまった。
komatta koto ni, ie no kagi o nakushite shimatta.
Annoyingly, I lost my house key.
ありがたいことに、近所の人が手伝ってくれた。
arigatai koto ni, kinjo no hito ga tetsudatte kureta.
Thankfully, the neighbors helped me.
Attach ことに to emotion verbs and adjectives
Attach ことに to the past form of emotion verbs (驚いた、困った), i-adjectives (嬉しい、ありがたい), or na-adjectives (残念な).
残念なことに、楽しみにしていたコンサートが中止になった。
zannen na koto ni, tanoshimi ni shite ita konsaato ga chuushi ni natta.
Regrettably, the concert I was looking forward to was canceled.
驚いたことに、八十歳の祖母がスマホでメールを送ってきた。
odoroita koto ni, hachijussai no sobo ga sumaho de meeru o okutte kita.
To my surprise, my eighty-year-old grandmother sent me an email from her smartphone.
残念なことに、駅前の古い本屋が来月閉店するそうだ。
zannen na koto ni, ekimae no furui hon’ya ga raigetsu heiten suru sou da.
Sadly, I hear the old bookstore in front of the station is closing next month.
ありがたいことに、会社が引っ越しの費用を全部払ってくれた。
arigatai koto ni, kaisha ga hikkoshi no hiyou o zenbu haratte kureta.
Thankfully, my company paid all my moving costs.
7 more examples in the grammar path — free for a limited time.