A time-limited waveform \(g(x)\) is specified as follows:
\[
g(x)=\begin{cases}-k, & -\pi<x\le0\\ +k, & 0<x\le\pi\\ 0, & \text{otherwise}\end{cases}
\]
A new waveform \(f(x)\) is constructed from \(g(x)\) as follows:
\[
f(x)=\sum_{m=-\infty}^{\infty}g(x+2\pi m),\qquad \text{for all } x\in\mathbb{R}
\]
The sum of the coefficients of the third harmonics of the sine and cosine terms in the trigonometric Fourier series expansion of \(f(x)\) is \(\dfrac{2}{3\pi}\).
What is the value of \(k\)?